Re: [PATCH] D18501: Fix compilation on FreeBSD

2016-04-02 Thread Dimitry Andric via cfe-commits
dim abandoned this revision.
dim added a comment.

Yes, this was indeed the wrong include order.  During the latter stages of 
FreeBSD's buildworld, the compiler is invoked with `-nostdinc++`, but 
`/usr/include` was put before the libc++ include directory, 
`/usr/include/c++/v1`.  So as @rsmith remarked, the system's `math.h` was found 
before the one from libc++, causing the complaints about missing declarations.


http://reviews.llvm.org/D18501



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-02 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment.

I think will be good idea to convert !strcmp(...) to strcmp(...) == 0.


http://reviews.llvm.org/D18703



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r265238 - clang-cl: Don't skip i_group flags other than -include when building pchs.

2016-04-02 Thread Nico Weber via cfe-commits
Author: nico
Date: Sat Apr  2 14:10:07 2016
New Revision: 265238

URL: http://llvm.org/viewvc/llvm-project?rev=265238&view=rev
Log:
clang-cl: Don't skip i_group flags other than -include when building pchs.

Before this change, e.g. -isystem flags in front of the /FI corresponding to the
pch file would be incorrectly ignored.

Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/cl-pch-search.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=265238&r1=265237&r2=265238&view=diff
==
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Apr  2 14:10:07 2016
@@ -416,7 +416,8 @@ void Clang::AddPreprocessingOptions(Comp
   for (const Arg *A : Args.filtered(options::OPT_clang_i_Group)) {
 ++AI;
 
-if (getToolChain().getDriver().IsCLMode()) {
+if (getToolChain().getDriver().IsCLMode() &&
+A->getOption().matches(options::OPT_include)) {
   // In clang-cl mode, /Ycfoo.h means that all code up to a foo.h
   // include is compiled into foo.h, and everything after goes into
   // the .obj file. /Yufoo.h means that all includes prior to and including

Modified: cfe/trunk/test/Driver/cl-pch-search.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-pch-search.cpp?rev=265238&r1=265237&r2=265238&view=diff
==
--- cfe/trunk/test/Driver/cl-pch-search.cpp (original)
+++ cfe/trunk/test/Driver/cl-pch-search.cpp Sat Apr  2 14:10:07 2016
@@ -4,3 +4,7 @@
 // REQUIRES: x86-registered-target
 // Check that pchfile.h next to to pchfile.cc is found correctly.
 // RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c /Fo%t.obj /Fp%t.pch -- 
%S/Inputs/pchfile.cpp 
+
+// Check that i_group flags other than -include aren't skipped (e.g. -isystem).
+#include "header0.h"
+// RUN: %clang_cl -Werror -isystem%S/Inputs /Yupchfile.h /FIpchfile.h /c 
/Fo%t.obj /Fp%t.pch -- %s


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r265252 - [c-index-test] Fix leak in print_completion_result, NFC

2016-04-02 Thread Vedant Kumar via cfe-commits
Author: vedantk
Date: Sat Apr  2 19:54:46 2016
New Revision: 265252

URL: http://llvm.org/viewvc/llvm-project?rev=265252&view=rev
Log:
[c-index-test] Fix leak in print_completion_result, NFC

Modified:
cfe/trunk/tools/c-index-test/c-index-test.c

Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=265252&r1=265251&r2=265252&view=diff
==
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Sat Apr  2 19:54:46 2016
@@ -1997,6 +1997,7 @@ static void print_completion_result(CXCo
   enum CXCursorKind ParentKind;
   CXString ParentName;
   CXString BriefComment;
+  CXString Annotation;
   const char *BriefCommentCString;
   
   fprintf(file, "%s:", clang_getCString(ks));
@@ -2030,9 +2031,10 @@ static void print_completion_result(CXCo
 for (i = 0; i < annotationCount; ++i) {
   if (i != 0)
 fprintf(file, ", ");
-  fprintf(file, "\"%s\"",
-  clang_getCString(clang_getCompletionAnnotation(
- completion_result->CompletionString, i)));
+  Annotation =
+  clang_getCompletionAnnotation(completion_result->CompletionString, 
i);
+  fprintf(file, "\"%s\"", clang_getCString(Annotation));
+  clang_disposeString(Annotation);
 }
 fprintf(file, ")");
   }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r265257 - Fix test case committed in r265197.

2016-04-02 Thread Akira Hatanaka via cfe-commits
Author: ahatanak
Date: Sat Apr  2 22:36:22 2016
New Revision: 265257

URL: http://llvm.org/viewvc/llvm-project?rev=265257&view=rev
Log:
Fix test case committed in r265197.

The test was failing on some release build because the basic block names
I was expecting weren't printed.

Modified:
cfe/trunk/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp

Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp?rev=265257&r1=265256&r2=265257&view=diff
==
--- cfe/trunk/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp Sat Apr  2 22:36:22 
2016
@@ -225,17 +225,17 @@ void f() {
 // WIN32-LIFETIME: invoke void @"\01?g@lifetime_marker@@YAXXZ"()
 // WIN32-LIFETIME-NEXT: to label %[[cont:[^ ]*]] unwind label %[[lpad0:[^ ]*]]
 //
-// WIN32-LIFETIME: [[cont]]:
+// WIN32-LIFETIME: [[cont]]
 // WIN32-LIFETIME: call x86_thiscallcc void 
@"\01??1C@lifetime_marker@@QAE@XZ"({{.*}})
 // WIN32-LIFETIME: %[[bc1:.*]] = bitcast %"struct.lifetime_marker::C"* %[[c]] 
to i8*
 // WIN32-LIFETIME: call void @llvm.lifetime.end(i64 1, i8* %[[bc1]])
 //
-// WIN32-LIFETIME: [[lpad0]]:
+// WIN32-LIFETIME: [[lpad0]]
 // WIN32-LIFETIME-NEXT: cleanuppad
 // WIN32-LIFETIME: call x86_thiscallcc void 
@"\01??1C@lifetime_marker@@QAE@XZ"({{.*}})
 // WIN32-LIFETIME: cleanupret {{.*}} unwind label %[[lpad1:[^ ]*]]
 //
-// WIN32-LIFETIME: [[lpad1]]:
+// WIN32-LIFETIME: [[lpad1]]
 // WIN32-LIFETIME-NEXT: cleanuppad
 // WIN32-LIFETIME: %[[bc2:.*]] = bitcast %"struct.lifetime_marker::C"* %[[c]] 
to i8*
 // WIN32-LIFETIME: call void @llvm.lifetime.end(i64 1, i8* %[[bc2]])


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18709: Add copyright notice to modulemap files

2016-04-02 Thread Doug Gregor via cfe-commits
doug.gregor added a subscriber: doug.gregor.
doug.gregor accepted this revision.
doug.gregor added a reviewer: doug.gregor.
doug.gregor added a comment.
This revision is now accepted and ready to land.

Yes, this is acceptable. Please go ahead and commit.


http://reviews.llvm.org/D18709



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits