[PATCH] D39162: [test] Fix clang-test for FreeBSD and NetBSD

2017-10-21 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 119772. lichray retitled this revision from "[test] Fix clang-test for FreeBSD" to "[test] Fix clang-test for FreeBSD and NetBSD". lichray edited the summary of this revision. https://reviews.llvm.org/D39162 Files: test/Unit/lit.cfg.py Index:

[PATCH] D39162: [test] Fix clang-test for FreeBSD

2017-10-21 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: test/Unit/lit.cfg.py:39 shlibpath_var = '' -if platform.system() == 'Linux': +if platform.system() in ['Linux', 'FreeBSD']: shlibpath_var = 'LD_LIBRARY_PATH' Please include 'NetBSD' next to 'FreeBSD'.

[PATCH] D39162: [test] Fix clang-test for FreeBSD

2017-10-21 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. Herald added subscribers: krytarowski, emaste. Lit tries to inject the shared library paths, but no action is taken when `platform.system()` is not recognized, results in an environment variable with an empty name, which is illegal. The patch fixes this mechanism

[PATCH] D39156: [libunwind] Make HIDDEN_DIRECTIVE a function-like macro. NFCI.

2017-10-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Thanks for cleaning this up. IIRC, I have similar behavior in compiler-rt for `HIDDEN_SYMBOL`. https://reviews.llvm.org/D39156 ___

[PATCH] D37954: Try to shorten system header paths when using -MD depfiles

2017-10-21 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I think the diagnosis on the original issue was incorrect. It seems to me that it was caused by the prefix being set as "/bin" instead of "/usr/bin", because clang _doesn't_ actually canonicalize its prefix, even when -no-canonical-prefixes isn't specified! All it

Re: r316278 - [libclang, bindings]: add spelling location

2017-10-21 Thread Masud Rahman via cfe-commits
Thanks, I will take a look. On Sat, Oct 21, 2017 at 5:53 PM, Aaron Ballman wrote: > I've reverted back to green in r316279 due to more bots failing. > > ~Aaron > > On Sat, Oct 21, 2017 at 5:35 PM, Aaron Ballman > wrote: > > This commit appears to

Re: r316278 - [libclang, bindings]: add spelling location

2017-10-21 Thread Aaron Ballman via cfe-commits
I've reverted back to green in r316279 due to more bots failing. ~Aaron On Sat, Oct 21, 2017 at 5:35 PM, Aaron Ballman wrote: > This commit appears to have broken several bots. Can you revert or > quickly fix the issue? > >

r316279 - Reverting r316278 due to failing build bots.

2017-10-21 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Sat Oct 21 14:52:48 2017 New Revision: 316279 URL: http://llvm.org/viewvc/llvm-project?rev=316279=rev Log: Reverting r316278 due to failing build bots. http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/11896

Re: r316278 - [libclang, bindings]: add spelling location

2017-10-21 Thread Aaron Ballman via cfe-commits
This commit appears to have broken several bots. Can you revert or quickly fix the issue? http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/11896 http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/12380 Thanks! ~Aaron On Sat, Oct 21, 2017 at 4:53 PM, Masud Rahman via

[PATCH] D39161: [bindings] remove unique_external test failure

2017-10-21 Thread Masud Rahman via Phabricator via cfe-commits
frutiger added a comment. I was unable to produce a simple test case that would still result in a cursor with 'unique external' linkage. @rsmith I would appreciate if you can think of a symbol that may still have this kind of linkage. Thanks! https://reviews.llvm.org/D39161

[PATCH] D39161: [bindings] remove unique_external test failure

2017-10-21 Thread Masud Rahman via Phabricator via cfe-commits
frutiger created this revision. In SVN r314037, linkage determination of a symbol was significantly refactored. This resulted in extern anonymous namespace declarations to no longer be considered 'unique_external'. This ultimately broke a test in the Python bindings. This commit removes the

[PATCH] D37905: [libclang, bindings]: add spelling location

2017-10-21 Thread Masud Rahman via Phabricator via cfe-commits
frutiger closed this revision. frutiger added a comment. @compnerd I do now. Landed in https://reviews.llvm.org/rL316278. https://reviews.llvm.org/D37905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r316278 - [libclang, bindings]: add spelling location

2017-10-21 Thread Masud Rahman via cfe-commits
Author: frutiger Date: Sat Oct 21 13:53:49 2017 New Revision: 316278 URL: http://llvm.org/viewvc/llvm-project?rev=316278=rev Log: [libclang, bindings]: add spelling location o) Add a 'Location' class that represents the four properties of a physical location o) Enhance 'SourceLocation' to

[PATCH] [bindings] fix TLS test failure

2017-10-21 Thread Masud Rahman via cfe-commits
Since cfe commit r237337, '__declspec(thread)' and 'thread_local' have been the same since MSVC 2015. i.e. they are both considered to supply a dynamic TLS kind, not a static TLS kind. This test originally did not specify which version of MS compatibility to assume. As a result, the test was

r316275 - Fix a typo with -fno-double-square-bracket-attributes and add a test to demonstrate that it works as expected in C++11 mode. Additionally corrected the handling of -fdouble-square-bracket-at

2017-10-21 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Sat Oct 21 13:28:58 2017 New Revision: 316275 URL: http://llvm.org/viewvc/llvm-project?rev=316275=rev Log: Fix a typo with -fno-double-square-bracket-attributes and add a test to demonstrate that it works as expected in C++11 mode. Additionally corrected the handling

[PATCH] D37855: [bindings] allow null strings in Python 3

2017-10-21 Thread Masud Rahman via Phabricator via cfe-commits
frutiger closed this revision. frutiger added a comment. Landed in https://reviews.llvm.org/rL316264. https://reviews.llvm.org/D37855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36101: Fix usage of right shift operator in fold expressions

2017-10-21 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 119767. Rakete added a comment. Used the naming convention of LLVM + friendly ping. :) https://reviews.llvm.org/D36101 Files: lib/Parse/ParseExpr.cpp test/Parser/cxx1z-fold-expressions.cpp Index: test/Parser/cxx1z-fold-expressions.cpp

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-10-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 119766. lebedev.ri marked 28 inline comments as done. lebedev.ri added a comment. Rebased. Addressed @aaron.ballman review notes (mainly stylistic) Repository: rL LLVM https://reviews.llvm.org/D36836 Files: LICENSE.TXT

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-10-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:102 +const unsigned short Nesting; /// How deeply nested is Loc located? +const Criteria C : 3; /// The criteria of the increment +

[PATCH] D38831: [libcxx] P0604, invoke_result and is_invocable

2017-10-21 Thread Agustín Bergé via Phabricator via cfe-commits
K-ballo updated this revision to Diff 119764. K-ballo added a comment. Fix synopsis https://reviews.llvm.org/D38831 Files: include/type_traits include/variant test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316268: [Sema] Fixes for enum handling for tautological comparison diagnostics (authored by lebedevri). Changed prior to commit: https://reviews.llvm.org/D39122?vs=119759=119760#toc Repository: rL

r316269 - Add release notes for the recent -fdouble-square-bracket-attributes and -fno-double-square-bracket-attributes compiler flags.

2017-10-21 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Sat Oct 21 09:45:08 2017 New Revision: 316269 URL: http://llvm.org/viewvc/llvm-project?rev=316269=rev Log: Add release notes for the recent -fdouble-square-bracket-attributes and -fno-double-square-bracket-attributes compiler flags. Modified:

r316268 - [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Sat Oct 21 09:44:03 2017 New Revision: 316268 URL: http://llvm.org/viewvc/llvm-project?rev=316268=rev Log: [Sema] Fixes for enum handling for tautological comparison diagnostics Summary: As Mattias Eriksson has reported in PR35009, in C, for enums, the underlying type

r316267 - Fixing broken attribute documentation for __attribute__((noescape)); a code block was missing and the existing code block was missing a mandatory newline.

2017-10-21 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Sat Oct 21 09:43:01 2017 New Revision: 316267 URL: http://llvm.org/viewvc/llvm-project?rev=316267=rev Log: Fixing broken attribute documentation for __attribute__((noescape)); a code block was missing and the existing code block was missing a mandatory newline.

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/Sema/SemaChecking.cpp:8619 + if (OtherRange.Width == 0) +return Value == 0 ? LimitType::Both : llvm::Optional(); +

r316263 - Test commit

2017-10-21 Thread Masud Rahman via cfe-commits
Author: frutiger Date: Sat Oct 21 09:03:17 2017 New Revision: 316263 URL: http://llvm.org/viewvc/llvm-project?rev=316263=rev Log: Test commit Modified: cfe/trunk/README.txt Modified: cfe/trunk/README.txt URL:

r316264 - [bindings] allow null strings in Python 3

2017-10-21 Thread Masud Rahman via cfe-commits
Author: frutiger Date: Sat Oct 21 09:13:41 2017 New Revision: 316264 URL: http://llvm.org/viewvc/llvm-project?rev=316264=rev Log: [bindings] allow null strings in Python 3 Some API calls accept 'NULL' instead of a char array (e.g. the second argument to 'clang_ParseTranslationUnit'). For Python

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 119759. lebedev.ri marked an inline comment as done. lebedev.ri added a comment. Address review notes. Repository: rL LLVM https://reviews.llvm.org/D39122 Files: lib/Sema/SemaChecking.cpp test/Sema/outof-range-enum-constant-compare.c

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaChecking.cpp:8619 + if (OtherRange.Width == 0) +return Value == 0 ? LimitType::Both : llvm::Optional(); + aaron.ballman wrote: > Instead of default constructing the Optional, you should use

[PATCH] D36892: [clang-tidy] check_clang_tidy.py: support CHECK-NOTES prefix

2017-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I am okay with this direction but would still like @alexfh to accept before you commit. Repository: rL LLVM https://reviews.llvm.org/D36892

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:8186 + // For enum types, for C code, use underlying data type. + if (const EnumType *ET = dyn_cast(T)) +T = ET->getDecl()->getIntegerType().getDesugaredType(C).getTypePtr();

[PATCH] D39160: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-21 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a subscriber: cfe-commits. spatel added a comment. Oops - I wrongly made llvm-commits a subscriber rather than cfe-commits. Let me know if I should reopen under a new thread to get the patch to hit the right mailing list. https://reviews.llvm.org/D39160

Attribute spelling policy

2017-10-21 Thread Aaron Ballman via cfe-commits
Attributes come with multiple spelling flavors, but when it comes to adding new attributes that are not present in other compiler tools such as GCC or MSVC, we have done a poor job of being consistent with which spelling flavors we adopt the attributes under. Some of our attributes are specified

[PATCH] D36892: [clang-tidy] check_clang_tidy.py: support CHECK-NOTES prefix

2017-10-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 119758. lebedev.ri added a comment. Rebased. Repository: rL LLVM https://reviews.llvm.org/D36892 Files: test/clang-tidy/check_clang_tidy.py Index: test/clang-tidy/check_clang_tidy.py

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaChecking.cpp:8186 + // For enum types, for C code, use underlying data type. + if (const EnumType *ET = dyn_cast(T)) +T = ET->getDecl()->getIntegerType().getDesugaredType(C).getTypePtr();

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 119757. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. Address review notes. Repository: rL LLVM https://reviews.llvm.org/D39122 Files: lib/Sema/SemaChecking.cpp test/Sema/outof-range-enum-constant-compare.c

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:77 + const std::array Msgs = {{ + // FIXME: these messages somehow trigger an assertion: + // Fix conflicts with existing fix! The new replacement overlaps

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:4808 + // Make sure we get the template parameter list from the most + // recentdeclaration, since that is the only one that has is guaranteed to + // have all the default template argument information.

[PATCH] D39129: [OpenCL] Fix generation of constant address space sampler in function scope

2017-10-21 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @Anastasia, during the discussion of similar fix (https://reviews.llvm.org/D34342). I found another bug in the CodeGen library. Do you have time to fix it too? Here is the reproducer from the old review request: int get_sampler_initializer(void); kernel void foo() {

[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:8185 +if (!C.getLangOpts().CPlusPlus) { + // For enum types, for C code, use underlying data type. + if (const EnumType *ET = dyn_cast(T)) For enum types in C code, use the

[clang-tools-extra] r316260 - clang-tidy: Fix deps.

2017-10-21 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Sat Oct 21 04:02:30 2017 New Revision: 316260 URL: http://llvm.org/viewvc/llvm-project?rev=316260=rev Log: clang-tidy: Fix deps. Modified: clang-tools-extra/trunk/clang-tidy/CMakeLists.txt clang-tools-extra/trunk/clang-tidy/tool/CMakeLists.txt Modified:

[PATCH] D39156: [libunwind] Make HIDDEN_DIRECTIVE a function-like macro. NFCI.

2017-10-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. This avoids a hack for making it a no-op for windows. Also explicitly check for `_WIN32` instead of asduming it. https://reviews.llvm.org/D39156 Files: src/assembly.h Index: src/assembly.h ===