Re: r260842 - [index] Enhance c-index-test tool and have it link and test the clangIndex library directly.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
> On Feb 13, 2016, at 11:34 PM, NAKAMURA Takumi wrote: > > I guess it would break layering violation. Not sure what you mean, what is the layering violation ? I don’t see an issue with a tool binary linking both against the libclang C API and a C++ library. I could add yet another tool binary

Re: r260842 - [index] Enhance c-index-test tool and have it link and test the clangIndex library directly.

2016-02-13 Thread NAKAMURA Takumi via cfe-commits
I guess it would break layering violation. libclang exports just C API and it involves clangIndex, but coremain requires clangIndex and other dependent modules. I think you should do; - Export C++ API in libclang. (But I don't expect it would work for win32) - Link libclang as static. Then c-

r260844 - [c-index-test] Fix a gcc build error.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Sun Feb 14 01:08:31 2016 New Revision: 260844 URL: http://llvm.org/viewvc/llvm-project?rev=260844&view=rev Log: [c-index-test] Fix a gcc build error. Modified: cfe/trunk/tools/c-index-test/core_main.cpp Modified: cfe/trunk/tools/c-index-test/core_main.cpp URL: http:

r260843 - [index] Fix gcc builds.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Sun Feb 14 00:53:20 2016 New Revision: 260843 URL: http://llvm.org/viewvc/llvm-project?rev=260843&view=rev Log: [index] Fix gcc builds. Modified: cfe/trunk/include/clang/Index/IndexingAction.h cfe/trunk/tools/c-index-test/core_main.cpp Modified: cfe/trunk/include

r260841 - [index] Allow calling createIndexingAction() without passing another action to wrap over.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Sun Feb 14 00:39:03 2016 New Revision: 260841 URL: http://llvm.org/viewvc/llvm-project?rev=260841&view=rev Log: [index] Allow calling createIndexingAction() without passing another action to wrap over. Modified: cfe/trunk/include/clang/Index/IndexingAction.h cfe/

r260842 - [index] Enhance c-index-test tool and have it link and test the clangIndex library directly.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Sun Feb 14 00:39:11 2016 New Revision: 260842 URL: http://llvm.org/viewvc/llvm-project?rev=260842&view=rev Log: [index] Enhance c-index-test tool and have it link and test the clangIndex library directly. Added: cfe/trunk/test/Index/Core/ cfe/trunk/test/Index/Cor

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-02-13 Thread Richard via cfe-commits
LegalizeAdulthood updated this revision to Diff 47929. LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. Add FIXME for macro argument test case. http://reviews.llvm.org/D16529 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyM

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-02-13 Thread Richard via cfe-commits
LegalizeAdulthood updated this revision to Diff 47928. LegalizeAdulthood added a comment. Add FIXME for non-ASCII string literals. Allow delimiter stem to be configured. Avoid some string concatenation. http://reviews.llvm.org/D16529 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/mod

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-02-13 Thread Richard via cfe-commits
LegalizeAdulthood updated this revision to Diff 47927. LegalizeAdulthood marked 4 inline comments as done. LegalizeAdulthood added a comment. Update from review comments. Avoid some string concatenation when delimiter is empty. http://reviews.llvm.org/D16529 Files: clang-tidy/modernize/CMakeL

Re: [PATCH] D16965: Fix for Bug 14644 - clang confuses scope operator for global namespace giving extra qualification on member

2016-02-13 Thread Ryan Yee via cfe-commits
ryee88 updated this revision to Diff 47926. ryee88 added a comment. Messed up the diff. Uploading it again. http://reviews.llvm.org/D16965 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Parser/forward-declaration.cpp Index: test/Parser/forward-declaration.cp

Re: [PATCH] D16949: Fix for: Bug 5941 - improve diagnostic for * vs & confusion

2016-02-13 Thread Ryan Yee via cfe-commits
ryee88 updated this revision to Diff 47925. ryee88 added a comment. Sorry-- re-uploading the diff. Didn't notice I dropped the code changes. http://reviews.llvm.org/D16949 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaOverload.cpp test/Parser/overloaded-pointer-vs-referen

Re: [PATCH] D16949: Fix for: Bug 5941 - improve diagnostic for * vs & confusion

2016-02-13 Thread Ryan Yee via cfe-commits
ryee88 updated this revision to Diff 47924. ryee88 added a comment. Added unit test as per review comments. http://reviews.llvm.org/D16949 Files: test/Parser/overloaded-pointer-vs-reference-hint.cpp Index: test/Parser/overloaded-pointer-vs-reference-hint.cpp =

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Jorge Teixeira via cfe-commits
Hubert, Ok on keeping the tests simple. I removed the parentheses and transformed the fp checks into _Static_assert. JT On Sat, Feb 13, 2016 at 8:11 PM, Hubert Tong wrote: > On Sat, Feb 13, 2016 at 7:10 PM, Hubert Tong > wrote: >> >> Hi Jorge, >> >> I do not intend to "overcomplicate" the te

Re: [PATCH] D17072: Return immediatedly if Method is null, otherwise you'll get a crash when dyn_cast is called with a nullptr

2016-02-13 Thread don hinton via cfe-commits
hintonda updated this revision to Diff 47923. hintonda added a comment. - Only call HandleMemberFunctionDeclDelays() for valid NamedDecl pointers. HandleMemberFunctionDeclDelays() adds LateParsedMethodDeclaration elements to LateParsedDeclarations if the method has default args or exception-s

Re: [PATCH] D17130: Debloat some headers

2016-02-13 Thread Mehdi AMINI via cfe-commits
joker.eph added a subscriber: joker.eph. joker.eph added a comment. What the build time of clang before and after? (Your goal is to improve build time right?) http://reviews.llvm.org/D17130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

Re: [PATCH] D16965: Fix for Bug 14644 - clang confuses scope operator for global namespace giving extra qualification on member

2016-02-13 Thread Ryan Yee via cfe-commits
ryee88 updated this revision to Diff 47922. ryee88 added a comment. Added unit tests. http://reviews.llvm.org/D16965 Files: test/Parser/forward-declaration.cpp Index: test/Parser/forward-declaration.cpp === --- /dev/null +++ tes

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-02-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:718 @@ -717,1 +717,3 @@ + if (TI.hasFloat128Type()) +DefineFloatMacros(Builder, "FLT128", &TI.getFloat128Format(), "Q"); I am concerned that setting these macros are

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
On Sat, Feb 13, 2016 at 7:10 PM, Hubert Tong < hubert.reinterpretc...@gmail.com> wrote: > Hi Jorge, > > I do not intend to "overcomplicate" the testing as you put it, so there > will be cases which are not caught by these tests. > For *_MAX, if overflow occurs to the maximum positive finite value

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
Hi Jorge, I do not intend to "overcomplicate" the testing as you put it, so there will be cases which are not caught by these tests. For *_MAX, if overflow occurs to the maximum positive finite value (assuming no infinities), then it is possible for that value to be less than 10^37 and the test wi

Re: [PATCH] D17170: [OPENMP] Codegen for distribute directive

2016-02-13 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 47921. carlo.bertolli added a comment. Reflect changes in http://reviews.llvm.org/D17148 and show full context. Repository: rL LLVM http://reviews.llvm.org/D17170 Files: include/clang/AST/StmtOpenMP.h lib/CodeGen/CGOpenMPRuntime.cpp lib/Code

r260837 - [OpenMP] Rename the offload entry points.

2016-02-13 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Sat Feb 13 17:35:10 2016 New Revision: 260837 URL: http://llvm.org/viewvc/llvm-project?rev=260837&view=rev Log: [OpenMP] Rename the offload entry points. Summary: Unlike other outlined regions in OpenMP, offloading entry points have to have be visible (external linkage) for

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Jorge Teixeira via cfe-commits
Thanks Hubert. I'm curious to see how you will handle corner cases without library support, such as unsigned/signed zero and 0+x cases, with abs(x) < EPS. How does the parser/preprocessor interpret fp literals that are too "precise" for that machine but are fine for other targets (cross compile)?

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
Hi Jorge, Looks fine to me. I'll work on committing this (with minor changes) over the weekend. Basically, I intend to remove some extraneous parentheses and adjust the * _EPSILON, *_MIN and *_TRUE_MIN checks to reject values equal to 0. -- HT On Sat, Feb 13, 2016 at 2:33 PM, Jorge Teixeira wr

r260833 - [AST] Add a print() method in DeclarationName that accepts a PrintingPolicy.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Sat Feb 13 15:46:50 2016 New Revision: 260833 URL: http://llvm.org/viewvc/llvm-project?rev=260833&view=rev Log: [AST] Add a print() method in DeclarationName that accepts a PrintingPolicy. Modified: cfe/trunk/include/clang/AST/DeclarationName.h cfe/trunk/lib/AST/D

Re: [libcxx] r260431 - Recommit r260012 - Cleanup node-type handling in the unordered containers.

2016-02-13 Thread Evgenii Stepanov via cfe-commits
Hi, this is my error message: In file included from z.cc:1: /code/build-llvm/bin/../include/c++/v1/ext/hash_map:213:5: warning: Use of the header is deprecated. Migrate to [-W#warnings] # warning Use of the header is deprecated. Migrate to ^ /code/build-llvm/bin/../include/c++/v1/ext/h

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
I guess refreshing the build directory fixed the bots now. You may want to look into ccache as possibly the issue here. > On Feb 13, 2016, at 12:08 PM, Argyrios Kyrtzidis wrote: > > clangIndex library is not part of that command so I don’t understand how my > changes affect linking the clang bi

[PATCH] D17244: [clang-tidy] readability-ternary-operator new check

2016-02-13 Thread Kirill Bobyrev via cfe-commits
omtcyf0 created this revision. omtcyf0 added reviewers: alexfh, LegalizeAdulthood, Eugene.Zelenko, djasper. omtcyf0 added a subscriber: cfe-commits. This patch introduces a proof-of-concept check for clang-tidy aiming to suggest using ternary operator in order to improve readability. It's curren

Re: [PATCH] D16846: PR26449: Fixes for bugs in __builtin_classify_type implementation

2016-02-13 Thread John McCall via cfe-commits
rjmccall added a comment. Yes, thank you, that looks great. LGTM. http://reviews.llvm.org/D16846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
clangIndex library is not part of that command so I don’t understand how my changes affect linking the clang binary, clangIndex is only used for libclang. > On Feb 13, 2016, at 11:55 AM, Argyrios Kyrtzidis wrote: > > Sorry, I looked at it but it wasn’t clear to me what the problem is: > > FAIL

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-13 Thread Argyrios Kyrtzidis via cfe-commits
Sorry, I looked at it but it wasn’t clear to me what the problem is: FAILED: : /home/linaro/buildbot/clang-cmake-armv7-a15/stage1/tools/clang/clang.order: file not recognized: File truncated I thought it was some build SNAFU, do you have some hint on what I need to do to fix this ? > On Feb 1

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Jorge Teixeira via cfe-commits
Hubert, You're right about the *_MIN relationships, and I fixed them on the attached patch. As for the enums, since there we're not even testing if the literals are integers or fp numbers, and the Std. already reserves ranges for implementation-specific values for some macros, it felt more natura

Re: r260831 - Fix a leak in the generated code for attributes with strings.

2016-02-13 Thread Aaron Ballman via cfe-commits
On Sat, Feb 13, 2016 at 1:11 PM, Benjamin Kramer via cfe-commits wrote: > Author: d0k > Date: Sat Feb 13 12:11:49 2016 > New Revision: 260831 > > URL: http://llvm.org/viewvc/llvm-project?rev=260831&view=rev > Log: > Fix a leak in the generated code for attributes with strings. > > Storing std::str

r260831 - Fix a leak in the generated code for attributes with strings.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 12:11:49 2016 New Revision: 260831 URL: http://llvm.org/viewvc/llvm-project?rev=260831&view=rev Log: Fix a leak in the generated code for attributes with strings. Storing std::strings in attributes simply doesn't work, we never call the destructor. Use an array of Str

Re: [PATCH] D17143: When trying to get destructor name, make we have a complete type before calling LookupQualifiedName(), which will assert otherwise.

2016-02-13 Thread don hinton via cfe-commits
hintonda updated this revision to Diff 47914. hintonda added a comment. - Simplify diff http://reviews.llvm.org/D17143 Files: lib/Sema/SemaExprCXX.cpp test/SemaCXX/pr25156-crash-on-invalid.cpp Index: test/SemaCXX/pr25156-crash-on-invalid.cpp

Re: [PATCH] D16264: For FreeBSD, use _p variants of libraries for linking C++ programs

2016-02-13 Thread Dimitry Andric via cfe-commits
dim updated this revision to Diff 47913. dim added a comment. Add checks for -lm and -lm_p, when profiling is on. http://reviews.llvm.org/D16264 Files: lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h test/Driver/freebsd.cpp Index: test/Driver/freebsd.cpp ===

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
+#if ((FLT_MIN < DBL_MIN) || (DBL_MIN < LDBL_MIN)) +#error "Mandatory macros {FLT,DBL,LDBL}_MIN are invalid." This value again depends on the minimum exponent, and so the relationship being tested here is not required to hold. +#endif For the enumeration-like cases, perhaps it would be better

r260823 - RValue refs do not work that way.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 10:00:13 2016 New Revision: 260823 URL: http://llvm.org/viewvc/llvm-project?rev=260823&view=rev Log: RValue refs do not work that way. Modified: cfe/trunk/lib/CodeGen/CGCall.cpp Modified: cfe/trunk/lib/CodeGen/CGCall.cpp URL: http://llvm.org/viewvc/llvm-project/

r260822 - Don't copy a DenseMap just to do lookup in it.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 09:49:17 2016 New Revision: 260822 URL: http://llvm.org/viewvc/llvm-project?rev=260822&view=rev Log: Don't copy a DenseMap just to do lookup in it. Also remove the now unused isPodLike specialization. DenseMap only uses it for copies. Modified: cfe/trunk/lib/Sema

Re: r260760 - [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.

2016-02-13 Thread Renato Golin via cfe-commits
On 12 February 2016 at 23:11, Argyrios Kyrtzidis via cfe-commits wrote: > Author: akirtzidis > Date: Fri Feb 12 17:10:59 2016 > New Revision: 260760 > > URL: http://llvm.org/viewvc/llvm-project?rev=260760&view=rev > Log: > [libclang] Separate the underlying indexing functionality of libclang and

r260814 - Fix use after free.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 07:42:41 2016 New Revision: 260814 URL: http://llvm.org/viewvc/llvm-project?rev=260814&view=rev Log: Fix use after free. Found by asan. Modified: cfe/trunk/lib/Lex/Pragma.cpp Modified: cfe/trunk/lib/Lex/Pragma.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/tr

r260815 - Reduce the number of implicit StringRef->std::string conversions by threading StringRef through more APIs.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 07:42:54 2016 New Revision: 260815 URL: http://llvm.org/viewvc/llvm-project?rev=260815&view=rev Log: Reduce the number of implicit StringRef->std::string conversions by threading StringRef through more APIs. No functionality change intended. Modified: cfe/trunk/

AW: r260755 - Darwin: pass -stdlib=libc++ down to cc1 whenever we're targeting libc++

2016-02-13 Thread Hahnfeld, Jonas via cfe-commits
Hi Tim, as I did the change: Sorry that it broke for you on Darwin! I could not test myself and there doesn't seem to be a build-bot... To the change: I think the explicit passing of -stdlib=libc++ will override CLANG_DEFAULT_CXX_STDLIB on Darwin. Instead, Darwin::AddClangCXXStdlibIncludeArgs s

Re: [libcxx] r260431 - Recommit r260012 - Cleanup node-type handling in the unordered containers.

2016-02-13 Thread Eric Fiselier via cfe-commits
> The "hash_map" part of the name means they belong to "", and the actual type is defined in that header. Woops, Sorry I guess the name is used in both "std::__1::" in unordered_map and "__gnu_cxx::" in . My intention in the changes was to forward declare "std::__1::__hash_map_iterator". On Sat,

Re: [libcxx] r260431 - Recommit r260012 - Cleanup node-type handling in the unordered containers.

2016-02-13 Thread Eric Fiselier via cfe-commits
> hash_map still looks broken to me. Uh oh, Sorry :-S. The original breakage was caused by the removal of a typedef "hash_map" used, but I'm sure I fixed that. > should not they be prefixed with __gnu_cxx:: ? No, they are in the correct namespace. The "hash_map" part of the name means they belon