[PATCH] D38009: [Sema] Fix using old initializer during switch statement transformation.

2017-09-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. I think this is correct. https://reviews.llvm.org/D38009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D38118: [CodeGen][ObjC] Build the global block structure before emitting the body of global block invoke functions

2017-09-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. This patch fixes an infinite loop in IRGen that occurs when compiling the following code: void FUNC2() { static void (^const block1)(int) = ^(int a){ if (a--) block1(a); }; When IRGen visits the call to "block1", it knows that it alway

Re: r313827 - Give external linkage and mangling to lambdas inside inline variables and variable templates.

2017-09-20 Thread Vitaly Buka via cfe-commits
reverted by r313856 On Wed, Sep 20, 2017 at 6:30 PM, Richard Smith wrote: > Thanks, I'll fix this tomorrow; if that's not soon enough, please go ahead > and revert (or fix by adding a dummy enumerator in lib/AST/Linkage.h). > > On 20 Sep 2017 17:39, "Vitaly Buka via cfe-commits" < > cfe-commits@

r313856 - Revert "Give external linkage and mangling to lambdas inside inline variables and variable templates."

2017-09-20 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Wed Sep 20 19:51:56 2017 New Revision: 313856 URL: http://llvm.org/viewvc/llvm-project?rev=313856&view=rev Log: Revert "Give external linkage and mangling to lambdas inside inline variables and variable templates." To fix: runtime error: load of value 15, which is not a

Re: r313827 - Give external linkage and mangling to lambdas inside inline variables and variable templates.

2017-09-20 Thread Richard Smith via cfe-commits
Thanks, I'll fix this tomorrow; if that's not soon enough, please go ahead and revert (or fix by adding a dummy enumerator in lib/AST/Linkage.h). On 20 Sep 2017 17:39, "Vitaly Buka via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fas

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-20 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a subscriber: dberris. eugenis added inline comments. Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:39 + // Initialize SanitizerSections. + void sanitizerCompile(); + "compile" in this method name is confusing. It's used in the base c

[PATCH] D37562: [X86] Lower _mm[256|512]_[mask[z]]_avg_epu[8|16] intrinsics to native llvm IR

2017-09-20 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. In https://reviews.llvm.org/D37562#877209, @craig.topper wrote: > Was the code not using emmintrin.h and instead copied code from it that used > the builtins? Turned out to be code that had been preprocessed in the past. I'll unpreprocess the xmmintrin.h/emmintrin.h pa

[PATCH] D37562: [X86] Lower _mm[256|512]_[mask[z]]_avg_epu[8|16] intrinsics to native llvm IR

2017-09-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Was the code not using emmintrin.h and instead copied code from it that used the builtins? Repository: rL LLVM https://reviews.llvm.org/D37562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: r313827 - Give external linkage and mangling to lambdas inside inline variables and variable templates.

2017-09-20 Thread Vitaly Buka via cfe-commits
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/8038/steps/check-clang%20ubsan/logs/stdio -- /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/clang/lib/AST/Decl.cpp:1333:42: runtime error: load of value 15, which is not a valid value for type 'clang::LV

[PATCH] D37562: [X86] Lower _mm[256|512]_[mask[z]]_avg_epu[8|16] intrinsics to native llvm IR

2017-09-20 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. Actually, looking at the change it seems like it is and we better try to update emmintrin.h... Repository: rL LLVM https://reviews.llvm.org/D37562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-09-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 116125. arsenm added a comment. Herald added a subscriber: nhaehnle. Missed test update https://reviews.llvm.org/D38113 Files: include/clang/Basic/LangOptions.h lib/CodeGen/CGCall.cpp test/CodeGenOpenCL/amdgpu-attrs.cl test/CodeGenOpenCL/convergent.c

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-09-20 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. LGTM for the changes other than the test (I don't read opencl). https://reviews.llvm.org/D38113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37562: [X86] Lower _mm[256|512]_[mask[z]]_avg_epu[8|16] intrinsics to native llvm IR

2017-09-20 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. With this commit some (old) code stops to compile as it seems to remove some builtins, was that intentional? Reproducer: typedef long long __m128i __attribute__((__vector_size__(16))); typedef short __v8hi __attribute__((__vector_size__(16))); typedef char __v16qi

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-09-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. Herald added a subscriber: wdng. This was done for CUDA functions in r261779, and for the same reason this also needs to be done for OpenCL. An arbitrary function could have a barrier() call in it, which in turn requires the calling function to be convergent. https:

[PATCH] D38109: [fixup][Sema] Allow in C to define tags inside enumerations.

2017-09-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D38109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

2017-09-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Submitted for review https://reviews.llvm.org/D38109 - [fixup][Sema] Allow in C to define tags inside enumerations. Repository: rL LLVM https://reviews.llvm.org/D37089 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D38109: [fixup][Sema] Allow in C to define tags inside enumerations.

2017-09-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. Fix for too aggressive error err_type_defined_in_enum introduced in r313386. Defining tags inside enumerations is prohibited in C++ but allowed in C. https://reviews.llvm.org/D38109 Files: clang/lib/Sema/SemaDecl.cpp clang/test/Sema/enum.c Index: clang/test/

[PATCH] D38046: [Atomic][X8664] set max atomic inline/promote width according to the target

2017-09-20 Thread Wei Mi via Phabricator via cfe-commits
wmi updated this revision to Diff 116107. wmi added a comment. Herald added a subscriber: eraman. Address Eli's comments. Repository: rL LLVM https://reviews.llvm.org/D38046 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp lib/Basic/Targets/X86.h test/CodeGenCXX/atomic-i

[PATCH] D38046: [Atomic][X8664] set max atomic inline/promote width according to the target

2017-09-20 Thread Wei Mi via Phabricator via cfe-commits
wmi added inline comments. Comment at: lib/Basic/Targets/X86.h:898 + MaxAtomicPromoteWidth = 64; + MaxAtomicInlineWidth = 64; +} efriedma wrote: > wmi wrote: > > efriedma wrote: > > > I don't think we need to mess with MaxAtomicPromoteWidth? > > >

r313831 - [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Wed Sep 20 15:53:08 2017 New Revision: 313831 URL: http://llvm.org/viewvc/llvm-project?rev=313831&view=rev Log: [MSan] Disable sanitization for __sanitizer_dtor_callback. Summary: Eliminate unnecessary instrumentation at __sanitizer_dtor_callback call sites. Fixes https:/

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313831: [MSan] Disable sanitization for __sanitizer_dtor_callback. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D38063?vs=116100&id=116103#toc Repository: rL LLVM https

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-09-20 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I'm OK with this going into the repo a is (although it is light on tests!), as long as we have an agreement that you'll be OK with iteration on both the interface and the implementation to handle real-world projects. More specifically, for this to work well on large/c

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 116100. morehouse added a comment. - Add LLVM test. https://reviews.llvm.org/D38063 Files: clang/lib/CodeGen/CGClass.cpp clang/test/CodeGenCXX/sanitize-dtor-callback.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp llvm/test/Instrumenta

[PATCH] D38092: [MS Compat]Allow __interfaces to have properties.

2017-09-20 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313828: [MS Compat]Allow __interfaces to have properties. (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38092?vs=116046&id=116097#toc Repository: rL LLVM https://revie

r313828 - [MS Compat]Allow __interfaces to have properties.

2017-09-20 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Sep 20 15:28:24 2017 New Revision: 313828 URL: http://llvm.org/viewvc/llvm-project?rev=313828&view=rev Log: [MS Compat]Allow __interfaces to have properties. __interface types are allowed in MSVC to have "property" data members (marked with declspec property). This pa

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-20 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 116092. chh edited the summary of this revision. https://reviews.llvm.org/D35743 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp === -

r313827 - Give external linkage and mangling to lambdas inside inline variables and variable templates.

2017-09-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 20 15:17:55 2017 New Revision: 313827 URL: http://llvm.org/viewvc/llvm-project?rev=313827&view=rev Log: Give external linkage and mangling to lambdas inside inline variables and variable templates. This implements the proposed approach in https://github.com/itanium-

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. Please also add a tiny LLVM test that call instructions with nosanitize metadata are not instrumented. https://reviews.llvm.org/D38063 ___ cfe

Re: [clang-tools-extra] r313752 - [clang-tidy] Fix linkage-related compiler errors in clang-tidy tests

2017-09-20 Thread Richard Smith via cfe-commits
Thank you! On 20 September 2017 at 05:16, Alexander Kornienko via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: alexfh > Date: Wed Sep 20 05:16:35 2017 > New Revision: 313752 > > URL: http://llvm.org/viewvc/llvm-project?rev=313752&view=rev > Log: > [clang-tidy] Fix linkage-related co

[PATCH] D38046: [Atomic][X8664] set max atomic inline/promote width according to the target

2017-09-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Basic/Targets/X86.h:898 + MaxAtomicPromoteWidth = 64; + MaxAtomicInlineWidth = 64; +} wmi wrote: > efriedma wrote: > > I don't think we need to mess with MaxAtomicPromoteWidth? > > > > Probably more i

[PATCH] D38092: [MS Compat]Allow __interfaces to have properties.

2017-09-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/Sema/SemaDeclCXX.cpp:2871 + InvalidDecl = + (DS.getStorageClassSpec() == DeclSpec::SCS_typedef || MSPropertyAttr) + ? 0

[PATCH] D38046: [Atomic][X8664] set max atomic inline/promote width according to the target

2017-09-20 Thread Wei Mi via Phabricator via cfe-commits
wmi added inline comments. Comment at: lib/Basic/Targets/X86.h:898 + MaxAtomicPromoteWidth = 64; + MaxAtomicInlineWidth = 64; +} efriedma wrote: > I don't think we need to mess with MaxAtomicPromoteWidth? > > Probably more intuitive to check "if (h

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-09-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added a project: clang. Currently, clang only diagnoses completely out-of-range comparisons (e.g. `char` and constant `300`), and comparisons of unsigned and `0`. But gcc also does diagnose the comparisons with the `std::numeric_limits<>::max()` / `st

[PATCH] D38090: [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.

2017-09-20 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313820: [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D38090?vs=116047&id=116073#toc Repository: r

r313820 - [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.

2017-09-20 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Sep 20 14:23:07 2017 New Revision: 313820 URL: http://llvm.org/viewvc/llvm-project?rev=313820&view=rev Log: [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins. Differential Revision: https://reviews.llvm.org/D38090 Added: cfe/trunk/test/CodeGen

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 116072. morehouse added a comment. - Add test case. - Use SanitizerScope. https://reviews.llvm.org/D38063 Files: clang/lib/CodeGen/CGClass.cpp clang/test/CodeGenCXX/sanitize-dtor-callback.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

[PATCH] D38046: [Atomic][X8664] set max atomic inline/promote width according to the target

2017-09-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Needs testcase. Comment at: lib/Basic/Targets/X86.h:898 + MaxAtomicPromoteWidth = 64; + MaxAtomicInlineWidth = 64; +} I don't think we need to mess with MaxAtomicPromoteWidth? Probably more intuitive to check "if (hasFea

[PATCH] D38060: Remove offset size check in nullptr arithmetic handling

2017-09-20 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor closed this revision. andrew.w.kaylor added a comment. This was committed as r313784. I put the wrong differential revision number in the comment for that check-in. https://reviews.llvm.org/D38060 ___ cfe-commits mailing list cfe-c

[libclc] r313810 - Implement cl_khr_int64_base_atomics builtins

2017-09-20 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Sep 20 13:42:14 2017 New Revision: 313810 URL: http://llvm.org/viewvc/llvm-project?rev=313810&view=rev Log: Implement cl_khr_int64_base_atomics builtins Signed-off-by: Jan Vesely Reviewed-by: Aaron Watry Tested-by: Aaron Watry Added: libclc/trunk/generic/include/

[libclc] r313811 - Implement cl_khr_int64_extended_atomics builtins

2017-09-20 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Sep 20 13:42:19 2017 New Revision: 313811 URL: http://llvm.org/viewvc/llvm-project?rev=313811&view=rev Log: Implement cl_khr_int64_extended_atomics builtins Signed-off-by: Jan Vesely Reviewed-by: Aaron Watry Tested-by: Aaron Watry Added: libclc/trunk/amdgcn/lib/c

[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

2017-09-20 Thread Alberto Magni via Phabricator via cfe-commits
alberto_magni added a comment. Yes, restricting the error to C++ would work. Many thanks. Repository: rL LLVM https://reviews.llvm.org/D37089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

Re: [clang-tools-extra] r313754 - [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Alex L via cfe-commits
Perfect, thanks! On 20 September 2017 at 20:33, Ilya Biryukov wrote: > Fixed by r313801. > Sorry for all the trouble. > > On Wed, Sep 20, 2017 at 9:22 PM, Ilya Biryukov > wrote: > >> I think I know what's wrong. I've already seen those failures. std::mutex >> gets destroyed before threads waiti

[PATCH] D35796: [analyzer] Delete with non-virtual destructor check

2017-09-20 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 116060. rnkovacs added a comment. - Accidentally left-in comment removed. - Checker file clang-formatted. https://reviews.llvm.org/D35796 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAn

r313805 - [OPENMP] Support for re-declarations when checking captured variables.

2017-09-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Sep 20 13:11:31 2017 New Revision: 313805 URL: http://llvm.org/viewvc/llvm-project?rev=313805&view=rev Log: [OPENMP] Support for re-declarations when checking captured variables. Need to check for variables re-declarations when checking that the variable was already capt

[PATCH] D38075: Fix PR34668 - P0704R1 implementation is too permissive

2017-09-20 Thread Tim Song via Phabricator via cfe-commits
tcanens added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:5185 if (!isIndirect && !LHS.get()->Classify(Context).isLValue()) { // C++2a allows functions with ref-qualifier & if they are also 'const'. +if (Proto->isConst() && !Proto->isVolatile())

[PATCH] D37881: [Sema] Prevent InstantiateClass from checking unrelated exception specs.

2017-09-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 116056. vsapsai added a comment. - Rename SavePendingDelayedStateRAII to SavePendingParsedClassStateRAII. https://reviews.llvm.org/D37881 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaTemplateInstantiate.cpp clang/test/SemaTemplate/crash-u

[libcxx] r313803 - Revert 313789 because gcc doesn't like it

2017-09-20 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Sep 20 12:38:43 2017 New Revision: 313803 URL: http://llvm.org/viewvc/llvm-project?rev=313803&view=rev Log: Revert 313789 because gcc doesn't like it Modified: libcxx/trunk/include/algorithm libcxx/trunk/include/random Modified: libcxx/trunk/include/algorithm U

r313802 - Fixed unused variable warning introduced in r313796 causing build failure

2017-09-20 Thread Cameron Desrochers via cfe-commits
Author: cameron314 Date: Wed Sep 20 12:37:37 2017 New Revision: 313802 URL: http://llvm.org/viewvc/llvm-project?rev=313802&view=rev Log: Fixed unused variable warning introduced in r313796 causing build failure Modified: cfe/trunk/lib/Lex/Lexer.cpp Modified: cfe/trunk/lib/Lex/Lexer.cpp URL:

Re: [clang-tools-extra] r313754 - [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Ilya Biryukov via cfe-commits
Fixed by r313801. Sorry for all the trouble. On Wed, Sep 20, 2017 at 9:22 PM, Ilya Biryukov wrote: > I think I know what's wrong. I've already seen those failures. std::mutex > gets destroyed before threads waiting on it are joined. > Will submit a fix shortly. > > On Wed, Sep 20, 2017 at 8:22 P

[PATCH] D38083: [clangd] Skip informative qualifier chunks.

2017-09-20 Thread Raoul Wols via Phabricator via cfe-commits
rwols added inline comments. Comment at: test/clangd/completion-qualifiers.test:12 +# CHECK: {"jsonrpc":"2.0","id":2,"result":[ +# CHEKC-DAG: {"label":"foo() const","kind":2,"detail":"int","sortText":"00035foo","filterText":"foo","insertText":"foo","insertTextFormat":1} +# CHEKC

[clang-tools-extra] r313801 - [clangd] Fixed crash on MacOS.

2017-09-20 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Sep 20 12:32:06 2017 New Revision: 313801 URL: http://llvm.org/viewvc/llvm-project?rev=313801&view=rev Log: [clangd] Fixed crash on MacOS. Caused by invalid order of members in ClangdServer. DiagnosticsMutex was used after destruction. Modified: clang-tools-extra/

Re: [clang-tools-extra] r313754 - [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Ilya Biryukov via cfe-commits
I think I know what's wrong. I've already seen those failures. std::mutex gets destroyed before threads waiting on it are joined. Will submit a fix shortly. On Wed, Sep 20, 2017 at 8:22 PM, Alex L wrote: > This commit causes the formatting.test to fail on macOS with an uncaught > exception: > >

[PATCH] D38075: Fix PR34668 - P0704R1 implementation is too permissive

2017-09-20 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Thanks! That was an oversight on my part, sorry. Comment at: lib/Sema/SemaExprCXX.cpp:5185 if (!isIndirect && !LHS.get()->Classify(Context).isLValue()) { // C++2a allows functions with ref-qualifier & if they are also 'const'. +

[PATCH] D37804: [OpenCL] Handle address space conversion while setting type alignment

2017-09-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:957 -return Builder.CreateBitCast(Addr, ConvertType(E->getType())); +return Builder.CreatePointerBitCastOrAddrSpaceCast( +Addr, ConvertType(E->getType())); Anastasia wr

[PATCH] D37491: [Preamble] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)

2017-09-20 Thread Cameron via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313796: [PCH] Fixed preamble breaking with BOM presence (and particularly, fluctuating… (authored by cameron314). Changed prior to commit: https://reviews.llvm.org/D37491?vs=116043&id=116049#toc Reposi

r313796 - [PCH] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)

2017-09-20 Thread Cameron Desrochers via cfe-commits
Author: cameron314 Date: Wed Sep 20 12:03:37 2017 New Revision: 313796 URL: http://llvm.org/viewvc/llvm-project?rev=313796&view=rev Log: [PCH] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence) This patch fixes broken preamble-skipping when the preamble region

[PATCH] D38092: [MS Compat]Allow __interfaces to have properties.

2017-09-20 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:2871 + InvalidDecl = + (DS.getStorageClassSpec() == DeclSpec::SCS_typedef || MSPropertyAttr) + ? 0 Note: Clang format did this craziness... I'm open to whatever form

[PATCH] D38092: [MS Compat]Allow __interfaces to have properties.

2017-09-20 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. __interface types are allowed in MSVC to have "property" data members (marked with declspec property). This patch alters Sema to allow property data members. https://reviews.llvm.org/D38092 Files: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/ms-interface.cpp In

[PATCH] D38090: [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.

2017-09-20 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 116047. tra added a comment. Addressed Justin's comments. https://reviews.llvm.org/D38090 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Headers/__clang_cuda_intrinsics.h clang/test/CodeGen/builtins-nvp

[PATCH] D37491: [Preamble] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)

2017-09-20 Thread Cameron via Phabricator via cfe-commits
cameron314 updated this revision to Diff 116043. cameron314 added a comment. Final diff. Test passes! https://reviews.llvm.org/D37491 Files: include/clang/Frontend/PrecompiledPreamble.h include/clang/Lex/Lexer.h include/clang/Lex/PreprocessorOptions.h lib/Frontend/FrontendActions.cpp

[PATCH] D38090: [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.

2017-09-20 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: clang/lib/Headers/__clang_cuda_intrinsics.h:161 +#endif // __CUDA_VERSION >= 9000 && (!defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= + // 300) + Nit, better linebreaking in the comment? Comment at:

[libcxx] r313789 - Mark the __eval methods on independent_bits_engine (and __independent_bits_engine) as const, since they make no changes to the object. NFC.

2017-09-20 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Sep 20 11:32:08 2017 New Revision: 313789 URL: http://llvm.org/viewvc/llvm-project?rev=313789&view=rev Log: Mark the __eval methods on independent_bits_engine (and __independent_bits_engine) as const, since they make no changes to the object. NFC. Modified: libcxx

[PATCH] D36423: [libc++] Introsort based sorting function

2017-09-20 Thread DIVYA SHANMUGHAN via Phabricator via cfe-commits
DIVYA added a comment. ping https://reviews.llvm.org/D36423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37482: run-clang-tidy: Use check_call instead of check_output

2017-09-20 Thread Kevin Funk via Phabricator via cfe-commits
kfunk added a comment. Bump? This is a trivial one https://reviews.llvm.org/D37482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 116038. Nebiroth added a comment. Added unit test. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ProtocolHandlers.cpp clangd/ProtocolHandlers.h unittests/clangd/ClangdTest

Re: [clang-tools-extra] r313754 - [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Alex L via cfe-commits
This commit causes the formatting.test to fail on macOS with an uncaught exception: libc++abi.dylib: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/35642/ I'm still looking

Re: [PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

2017-09-20 Thread Aaron Ballman via cfe-commits
On Wed, Sep 20, 2017 at 2:17 PM, Volodymyr Sapsai via Phabricator via cfe-commits wrote: > vsapsai added a comment. > > Thanks for following up, Alberto. I haven't expected such a use case. It is > possible to achieve the same with `LSA_SIZEOF_SA = sizeof(((len_and_sockaddr > *)0)->u)` but I don

[PATCH] D38090: [NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.

2017-09-20 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. Herald added subscribers: hiraditya, sanjoy, jholewinski. https://reviews.llvm.org/D38090 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Headers/__clang_cuda_intrinsics.h clang/test/CodeGen/builtins-nvptx-ptx60.

[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

2017-09-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for following up, Alberto. I haven't expected such a use case. It is possible to achieve the same with `LSA_SIZEOF_SA = sizeof(((len_and_sockaddr *)0)->u)` but I don't like it and don't want to force developers using such approach. For solving this problem I thi

r313784 - Remove offset size check in nullptr arithmetic handling

2017-09-20 Thread Andrew Kaylor via cfe-commits
Author: akaylor Date: Wed Sep 20 11:06:44 2017 New Revision: 313784 URL: http://llvm.org/viewvc/llvm-project?rev=313784&view=rev Log: Remove offset size check in nullptr arithmetic handling Differential Revision: https://reviews.llvm.org/D37042 Modified: cfe/trunk/lib/AST/Expr.cpp cfe/t

Re: r313316 - [Module map] Introduce a private module re-export directive.

2017-09-20 Thread Galina Kistanova via cfe-commits
Thanks for looking. It seems your commit exposed some other issue. Now, unfortunately, it has stopped being reproducible. Thanks for looking anyway. A good bug will show itself sooner or later. Thanks Galina On Mon, Sep 18, 2017 at 3:49 PM, Douglas Gregor wrote: > > On Sep 18, 2017, at 3:11

[libcxx] r313776 - Fix a bit of UB in __independent_bits_engine. Fixes PR#34663

2017-09-20 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Sep 20 10:34:11 2017 New Revision: 313776 URL: http://llvm.org/viewvc/llvm-project?rev=313776&view=rev Log: Fix a bit of UB in __independent_bits_engine. Fixes PR#34663 Modified: libcxx/trunk/include/algorithm Modified: libcxx/trunk/include/algorithm URL: http://l

[libclc] r313773 - Add travis CI configuration file

2017-09-20 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Sep 20 10:28:58 2017 New Revision: 313773 URL: http://llvm.org/viewvc/llvm-project?rev=313773&view=rev Log: Add travis CI configuration file Signed-off-by: Jan Vesely Added: libclc/trunk/.travis.yml Added: libclc/trunk/.travis.yml URL: http://llvm.org/viewvc/llvm

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-20 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: test/OpenMP/target_map_codegen.cpp:4845 +///==/// +// RUN: %clang_cc1 -DCK30 -std=c++11 -fopenmp -S -emit-llvm -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda %s -o - 2>&

[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

2017-09-20 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. One small nit. LGTM otherwise. Comment at: test/Driver/openmp-offload-gpu.c:133 +/// Check that the flag is passed when -fopenmp-relocatable-target is used. +// RUN: %clang -###

[libcxx] r313763 - Make libcxx tests work when llvm sources are not present.

2017-09-20 Thread Zachary Turner via cfe-commits
Author: zturner Date: Wed Sep 20 09:01:50 2017 New Revision: 313763 URL: http://llvm.org/viewvc/llvm-project?rev=313763&view=rev Log: Make libcxx tests work when llvm sources are not present. Despite a strong CMake warning that this is an unsupported libcxx build configuration, some bots still re

[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

2017-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/CopyConstructorInitCheck.cpp:24 +withInitializer(cxxConstructExpr(unless(hasDescendant(implicitCastExpr( +.bind("cruct-expr"))); + You pick a more readable name than

r313760 - Put target deduced from executable name at the start of argument list

2017-09-20 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Wed Sep 20 08:22:27 2017 New Revision: 313760 URL: http://llvm.org/viewvc/llvm-project?rev=313760&view=rev Log: Put target deduced from executable name at the start of argument list When clang is called as 'target-clang', put deduced target option at the start of argument

[PATCH] D37904: [clang-format] Fix FixNamespaceComments when BraceWrapping AfterNamespace is true.

2017-09-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. That's precisely what I've written, but, as I'd said before, such tests pass already without any modification in `NamespaceEndCommentsFixer`. https://reviews.llvm.org/D37904 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D38077: [clangd] Put inacessible items to the end of completion list.

2017-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for quick review! https://reviews.llvm.org/D38077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38077: [clangd] Put inacessible items to the end of completion list.

2017-09-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313759: [clangd] Put inacessible items to the end of completion list. (authored by ibiryukov). Repository: rL LLVM https://reviews.llvm.org/D38077 Files: clang-tools-extra/trunk/clangd/ClangdUnit.cp

[clang-tools-extra] r313759 - [clangd] Put inacessible items to the end of completion list.

2017-09-20 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Sep 20 08:09:14 2017 New Revision: 313759 URL: http://llvm.org/viewvc/llvm-project?rev=313759&view=rev Log: [clangd] Put inacessible items to the end of completion list. Reviewers: bkramer, krasimir Reviewed By: krasimir Subscribers: klimek, cfe-commits Differential

[PATCH] D38083: [clangd] Skip informative qualifier chunks.

2017-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Completion results look much nicer without them. Informative qualifiers are stored for every method from a base class, even when calling those methods does not require any qualifiers. For example, struct Foo { int foo(); }; struct Bar : Foo { }; void tes

[PATCH] D38081: Set completion priority of destructors and operators to CCP_Unlikely.

2017-09-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. +1! I totally agree with this! https://reviews.llvm.org/D38081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38077: [clangd] Put inacessible items to the end of completion list.

2017-09-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Makes sense. https://reviews.llvm.org/D38077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D37263: [clang-format] Ignore case when sorting using-declarations

2017-09-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 115998. krasimir added a comment. - Stable sort using declarations https://reviews.llvm.org/D37263 Files: lib/Format/UsingDeclarationsSorter.cpp unittests/Format/UsingDeclarationsSorterTest.cpp Index: unittests/Format/UsingDeclarationsSorterTest.cpp =

[PATCH] D38081: Set completion priority of destructors and operators to CCP_Unlikely.

2017-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added a subscriber: eraman. It will move destructors and operators to the end of completion list. Destructors and operators are currently very high on the completion list, as they have the same priority as member functions. However, they are clearly not

[PATCH] D37904: [clang-format] Fix FixNamespaceComments when BraceWrapping AfterNamespace is true.

2017-09-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. This is how you could add a test in `NamespaceEndCommentsFixerTest.cpp`: TEST_F(NamespaceEndCommentsFixerTest, FixesNamespaceCommentsInAllmanStyle) { FormatStyle AllmanStyle = getLLVMStyle(); AllmanStyle.BreakBeforeBraces = FormatStyle::BS_Allman; EXPECT_EQ

r313756 - Replace r313747, don't always warn on enums, rework testcases.

2017-09-20 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Wed Sep 20 06:50:01 2017 New Revision: 313756 URL: http://llvm.org/viewvc/llvm-project?rev=313756&view=rev Log: Replace r313747, don't always warn on enums, rework testcases. As Aaron Ballman has pointed out, that is not really correct. So the key problem there is the inva

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-09-20 Thread Alex L via cfe-commits
On 16 August 2017 at 02:49, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Tue Aug 15 18:49:53 2017 > New Revision: 310983 > > URL: http://llvm.org/viewvc/llvm-project?rev=310983&view=rev > Log: > PR19668, PR23034: Fix handling of move constructors and

[PATCH] D38032: [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313754: [clangd] Serialize onDiagnosticsReady callbacks for the same file. (authored by ibiryukov). Repository: rL LLVM https://reviews.llvm.org/D38032 Files: clang-tools-extra/trunk/clangd/ClangdSe

[clang-tools-extra] r313754 - [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Sep 20 05:58:55 2017 New Revision: 313754 URL: http://llvm.org/viewvc/llvm-project?rev=313754&view=rev Log: [clangd] Serialize onDiagnosticsReady callbacks for the same file. Summary: Calls to onDiagnosticsReady were done concurrently before. This sometimes led to olde

[PATCH] D13811: [clang-format] AllowShortFunctionsOnASingleLine: true/Empty didn't work with BreakBeforeBraces: Linux/Allman.

2017-09-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius abandoned this revision. curdeius added a comment. This was fixed by https://reviews.llvm.org/rL312904 and other commits. https://reviews.llvm.org/D13811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

Re: r313747 - [Sema] CheckTautologicalComparisonWithZero(): always complain about enums

2017-09-20 Thread Aaron Ballman via cfe-commits
On Wed, Sep 20, 2017 at 6:15 AM, Roman Lebedev via cfe-commits wrote: > Author: lebedevri > Date: Wed Sep 20 03:15:27 2017 > New Revision: 313747 > > URL: http://llvm.org/viewvc/llvm-project?rev=313747&view=rev > Log: > [Sema] CheckTautologicalComparisonWithZero(): always complain about enums > >

[clang-tools-extra] r313752 - [clang-tidy] Fix linkage-related compiler errors in clang-tidy tests

2017-09-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 20 05:16:35 2017 New Revision: 313752 URL: http://llvm.org/viewvc/llvm-project?rev=313752&view=rev Log: [clang-tidy] Fix linkage-related compiler errors in clang-tidy tests Modified: clang-tools-extra/trunk/test/clang-tidy/misc-inefficient-algorithm.cpp clang-

[PATCH] D38032: [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the review! https://reviews.llvm.org/D38032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38032: [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 115985. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Added a comment to version map. - Fixed compilation after rebase. https://reviews.llvm.org/D38032 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clang

[PATCH] D38032: [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG Comment at: clangd/ClangdServer.h:287 + std::mutex DiagnosticsMutex; + llvm::StringMap ReportedDiagnosticVersions; }; Comment what it maps from.

[PATCH] D38077: [clangd] Put inacessible items to the end of completion list.

2017-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. https://reviews.llvm.org/D38077 Files: clangd/ClangdUnit.cpp test/clangd/authority-less-uri.test test/clangd/completion-priorities.test test/clangd/completion-snippet.test test/clangd/completion.test test/clangd/protocol.test Index: test/clangd/pr

[PATCH] D38032: [clangd] Serialize onDiagnosticsReady callbacks for the same file.

2017-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.cpp:321-324 +// FIXME(ibiryukov): get rid of '<' comparison here. In the current +// implementation diagnostics will not be reported after version counters' +// overflow. This should not happen in pr

  1   2   >