[PATCH] D31069: Don't warn about an unreachable fallthrough annotation in a template function

2017-03-16 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, do you need someone to commit for you? https://reviews.llvm.org/D31069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r298040 - [AVX-512] Add missing typecasts and parentheses to _mm512_mask_i64gather_ps. My macro cleanup script I used on the others last year must have missed it.

2017-03-16 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Mar 17 00:14:37 2017 New Revision: 298040 URL: http://llvm.org/viewvc/llvm-project?rev=298040=rev Log: [AVX-512] Add missing typecasts and parentheses to _mm512_mask_i64gather_ps. My macro cleanup script I used on the others last year must have missed it. Modified:

[PATCH] D31069: Don't warn about an unreachable fallthrough annotation in a template function

2017-03-16 Thread Ahmed Asadi via Phabricator via cfe-commits
ahmedasadi updated this revision to Diff 92104. ahmedasadi added a comment. Added a test case. https://reviews.llvm.org/D31069 Files: lib/Sema/AnalysisBasedWarnings.cpp test/SemaCXX/P30636.cpp Index: test/SemaCXX/P30636.cpp

[PATCH] D31069: Don't warn about an unreachable fallthrough annotation in a template function

2017-03-16 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. This needs a test case, but the change itself looks fine to me. Repository: rL LLVM https://reviews.llvm.org/D31069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30806: [nonnull] Teach Clang to attach the nonnull LLVM attribute to declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source c

2017-03-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: include/clang/AST/ASTContext.h:1868 + bool *OverrideNonnullReturn = nullptr, + unsigned *OverrideNonnullArgs = nullptr, unsigned *IntegerConstantArgs =

Re: [PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-16 Thread Eric Christopher via cfe-commits
Great, thanks! Can you make this change instead Sean? :) -eric On Thu, Mar 16, 2017 at 7:20 PM Hal Finkel wrote: > > On 03/16/2017 08:11 PM, Eric Christopher wrote: > > > > On Thu, Mar 16, 2017 at 5:45 PM Hal Finkel wrote: > > > On 03/16/2017 07:40 PM, Eric

Re: [PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-16 Thread Hal Finkel via cfe-commits
On 03/16/2017 08:11 PM, Eric Christopher wrote: On Thu, Mar 16, 2017 at 5:45 PM Hal Finkel > wrote: On 03/16/2017 07:40 PM, Eric Christopher wrote: On Thu, Mar 16, 2017 at 5:37 PM Hal Finkel via Phabricator

Re: r298027 - [Serialization] Follow-up to r297972, deserialize name/loc in separate statements to make sure they deserialize in defined order.

2017-03-16 Thread Eric Christopher via cfe-commits
;) On Thu, Mar 16, 2017 at 7:13 PM Argyrios Kyrtzidis wrote: > *b* at the gcc bots, those are the worst… :-P > > On Mar 16, 2017, at 6:39 PM, Eric Christopher wrote: > > Also gcc bots fwiw :) > > -eric > > On Thu, Mar 16, 2017 at 6:01 PM Argyrios

Re: r298027 - [Serialization] Follow-up to r297972, deserialize name/loc in separate statements to make sure they deserialize in defined order.

2017-03-16 Thread Argyrios Kyrtzidis via cfe-commits
*b* at the gcc bots, those are the worst… :-P > On Mar 16, 2017, at 6:39 PM, Eric Christopher wrote: > > Also gcc bots fwiw :) > > -eric > > On Thu, Mar 16, 2017 at 6:01 PM Argyrios Kyrtzidis via cfe-commits >

[PATCH] D30806: [nonnull] Teach Clang to attach the nonnull LLVM attribute to declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source c

2017-03-16 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: include/clang/AST/ASTContext.h:1868 + bool *OverrideNonnullReturn = nullptr, + unsigned *OverrideNonnullArgs = nullptr, unsigned *IntegerConstantArgs =

Re: r298027 - [Serialization] Follow-up to r297972, deserialize name/loc in separate statements to make sure they deserialize in defined order.

2017-03-16 Thread Eric Christopher via cfe-commits
Also gcc bots fwiw :) -eric On Thu, Mar 16, 2017 at 6:01 PM Argyrios Kyrtzidis via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: akirtzidis > Date: Thu Mar 16 19:49:42 2017 > New Revision: 298027 > > URL: http://llvm.org/viewvc/llvm-project?rev=298027=rev > Log: > [Serialization]

RE: r297972 - [index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes

2017-03-16 Thread Yung, Douglas via cfe-commits
Your change does seem to have done the trick. Thanks! Douglas Yung > -Original Message- > From: Argyrios Kyrtzidis [mailto:akyr...@gmail.com] > Sent: Thursday, March 16, 2017 18:03 > To: Yung, Douglas > Cc: cfe-commits > Subject: Re: r297972 - [index/AST] Add references for ObjC

Re: [PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-16 Thread Eric Christopher via cfe-commits
On Thu, Mar 16, 2017 at 5:45 PM Hal Finkel wrote: > > On 03/16/2017 07:40 PM, Eric Christopher wrote: > > > > On Thu, Mar 16, 2017 at 5:37 PM Hal Finkel via Phabricator < > revi...@reviews.llvm.org> wrote: > > hfinkel added a comment. > > In

Re: r297972 - [index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes

2017-03-16 Thread Argyrios Kyrtzidis via cfe-commits
I have high hopes r298027 will fix this. > On Mar 16, 2017, at 5:42 PM, Argyrios Kyrtzidis wrote: > > I think I know what the issue is, preparing a fix. > > >> On Mar 16, 2017, at 4:38 PM, Yung, Douglas wrote: >> >> [I can't find Nathan's email, so

[PATCH] D30806: [nonnull] Teach Clang to attach the nonnull LLVM attribute to declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source c

2017-03-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: include/clang/AST/ASTContext.h:1865 /// arguments to the builtin that are required to be integer constant /// expressions. QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError , Please add some description

r298027 - [Serialization] Follow-up to r297972, deserialize name/loc in separate statements to make sure they deserialize in defined order.

2017-03-16 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Thu Mar 16 19:49:42 2017 New Revision: 298027 URL: http://llvm.org/viewvc/llvm-project?rev=298027=rev Log: [Serialization] Follow-up to r297972, deserialize name/loc in separate statements to make sure they deserialize in defined order. This should fix the windows bots.

[PATCH] D30806: [nonnull] Teach Clang to attach the nonnull LLVM attribute to declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source c

2017-03-16 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. Ping? https://reviews.llvm.org/D30806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r298022 - Remove setting LessPreciseFPMADOption on the TargetOption as it's

2017-03-16 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Mar 16 19:37:53 2017 New Revision: 298022 URL: http://llvm.org/viewvc/llvm-project?rev=298022=rev Log: Remove setting LessPreciseFPMADOption on the TargetOption as it's unused anywhere in llvm. Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp Modified:

Re: [PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-16 Thread Hal Finkel via cfe-commits
On 03/16/2017 07:40 PM, Eric Christopher wrote: On Thu, Mar 16, 2017 at 5:37 PM Hal Finkel via Phabricator > wrote: hfinkel added a comment. In https://reviews.llvm.org/D30415#703398, @echristo wrote: > Different

Re: r297972 - [index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes

2017-03-16 Thread Argyrios Kyrtzidis via cfe-commits
I think I know what the issue is, preparing a fix. > On Mar 16, 2017, at 4:38 PM, Yung, Douglas wrote: > > [I can't find Nathan's email, so sending to the submitter, Argyrios] > > Hi Argyrios/Nathan, > > This change appears to be causing 9 tests on Windows to fail. It

Re: [PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-16 Thread Eric Christopher via cfe-commits
On Thu, Mar 16, 2017 at 5:37 PM Hal Finkel via Phabricator < revi...@reviews.llvm.org> wrote: > hfinkel added a comment. > > In https://reviews.llvm.org/D30415#703398, @echristo wrote: > > > Different suggestion: > > > > Remove the faltivec option. Even gcc doesn't support it anymore afaict. > >

[PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D30415#703398, @echristo wrote: > Different suggestion: > > Remove the faltivec option. Even gcc doesn't support it anymore afaict. What are you suggesting? Always having the language extensions on? Or explicitly tying the language

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Are there other cases where makeNull would need to be replaced? Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-16 Thread Eric Christopher via Phabricator via cfe-commits
echristo requested changes to this revision. echristo added a comment. This revision now requires changes to proceed. Different suggestion: Remove the faltivec option. Even gcc doesn't support it anymore afaict. (Go ahead and commit the zvector part if you'd like). -eric

RE: r297972 - [index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes

2017-03-16 Thread Yung, Douglas via cfe-commits
[I can't find Nathan's email, so sending to the submitter, Argyrios] Hi Argyrios/Nathan, This change appears to be causing 9 tests on Windows to fail. It seems the compiler crashes when trying to run the tests. Can you please take a look? The affected tests are the following: Clang ::

r298012 - [Modules] Add documentation on private frameworks

2017-03-16 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu Mar 16 18:18:55 2017 New Revision: 298012 URL: http://llvm.org/viewvc/llvm-project?rev=298012=rev Log: [Modules] Add documentation on private frameworks Expand a bit on private modules with some guidance on how to write them in the context of frameworks.

r298013 - [Headers] Reapply: Add #include_next for tgmath.h on Darwin

2017-03-16 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu Mar 16 18:19:00 2017 New Revision: 298013 URL: http://llvm.org/viewvc/llvm-project?rev=298013=rev Log: [Headers] Reapply: Add #include_next for tgmath.h on Darwin Reapply r289181 but rename the include guard to avoid conflict with the one from Darwin. Allow darwin to

Re: r295156 - Add a definition for __STRUCT_PARM_ALIGN__ for elfv2 and 64-bit darwin platforms to match what other compilers produce.

2017-03-16 Thread Eric Christopher via cfe-commits
... and ppc64 darwin preprocessor stuff isn't tested at all. We should really just delete ppc darwin support at some point. Adding Iain here since he's said that he's working on the platform :) At any rate I added a single test in r298006 -eric On Wed, Feb 15, 2017 at 12:13 AM Eric Christopher

r298006 - Add a small test for __STRUCT_PARM_ALIGN__ for ppc64 darwin.

2017-03-16 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Mar 16 17:31:07 2017 New Revision: 298006 URL: http://llvm.org/viewvc/llvm-project?rev=298006=rev Log: Add a small test for __STRUCT_PARM_ALIGN__ for ppc64 darwin. Modified: cfe/trunk/test/Preprocessor/init.c Modified: cfe/trunk/test/Preprocessor/init.c URL:

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. The fundamental difference, is that Os/Oz especially are treated as `optimizations directive` that are independent of the pass pipeline: instructing that "loop unroll should not increase size" is independent of *where* is loop unroll inserted in the pipeline. The

r297998 - Create msbuild only when using MSVC

2017-03-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 16 16:21:00 2017 New Revision: 297998 URL: http://llvm.org/viewvc/llvm-project?rev=297998=rev Log: Create msbuild only when using MSVC Patch by: Mateusz Mikula Reviewers: rnk Reviewed By: rnk Subscribers: asl, mgorny, cfe-commits Tags: #clang-c Differential

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. In https://reviews.llvm.org/D30991#703199, @zturner wrote: > lgtm, do you have commit access? No, I don't. https://reviews.llvm.org/D30991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Zachary Turner via Phabricator via cfe-commits
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. lgtm, do you have commit access? https://reviews.llvm.org/D30991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 92050. hamzasood added a comment. @zturner: "it's just a vector of pointers" Oh.. I was so focussed on reducing copies that I completely forgot it's just an array of pointers being copied, not the entire environment block contents. In that case, yeah.

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D30920#703083, @mehdi_amini wrote: > In https://reviews.llvm.org/D30920#703082, @hfinkel wrote: > > > In https://reviews.llvm.org/D30920#700741, @mehdi_amini wrote: > > > > > Yes, the issue is only about how the driver accepts Os for the link

[PATCH] D31050: [ThinLTO] Clang support for emitting minimized bitcode for thin link

2017-03-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. Herald added a subscriber: Prazek. Clang companion patch to LLVM patch https://reviews.llvm.org/D31027, which adds support for emitting minimized bitcode file for use in the thin link step. Add a cc1 option -fthin-link-bitcode= to trigger this behavior. Depends

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D30920#703082, @hfinkel wrote: > In https://reviews.llvm.org/D30920#700741, @mehdi_amini wrote: > > > Yes, the issue is only about how the driver accepts Os for the link even > > though it has no effect > >

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D30920#700741, @mehdi_amini wrote: > In https://reviews.llvm.org/D30920#700574, @hfinkel wrote: > > > In https://reviews.llvm.org/D30920#700557, @mehdi_amini wrote: > > > > > In https://reviews.llvm.org/D30920#700433, @tejohnson wrote: > > > >

[PATCH] D31049: [Clang-tidy] Fix for misc-noexcept-move-constructor false triggers on defaulted declarations

2017-03-16 Thread Marek Jenda via Phabricator via cfe-commits
edyp87 created this revision. edyp87 added a project: clang-tools-extra. Herald added a subscriber: JDevlieghere. There is no need for triggering warning when noexcept specifier in move constructor or move-assignment operator is neither evaluated nor uninstantiated. This fixes bug reported

r297975 - Use arg_begin() instead of getArgumentList().begin(), the argument list is an implementation detail

2017-03-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 16 13:55:46 2017 New Revision: 297975 URL: http://llvm.org/viewvc/llvm-project?rev=297975=rev Log: Use arg_begin() instead of getArgumentList().begin(), the argument list is an implementation detail Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified:

r297974 - [AST] Follow-up to r297972, add default value for setGetterName/setSetterName if a source-loc is not provided.

2017-03-16 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Thu Mar 16 13:40:13 2017 New Revision: 297974 URL: http://llvm.org/viewvc/llvm-project?rev=297974=rev Log: [AST] Follow-up to r297972, add default value for setGetterName/setSetterName if a source-loc is not provided. Fixes lldb build. Modified:

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-16 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I think that clang-tidy allows case-specific subsetting of C++. It is said that C++ contains a beautiful language and I've found that definition of beauty to be very use-case specific. Checks for side-effect free, Haskell-like, functional code would be of enormous

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Noel Grandin via Phabricator via cfe-commits
grandinj added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:313 - Loc makeNull() { -return loc::ConcreteInt(BasicVals.getZeroWithPtrWidth()); + // Pass type to accomodate for different pointer bit-witdths of different + //

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Looks good with one more suggested fix. Comment at: include/clang/Driver/Job.h:129 + /// the given vector is to be copied in as opposed to moved. + void setEnvironment(const std::vector ); + Since it's just a vector of pointers, I

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. (By the way, this is what is done on Darwin: the -O flag is *ignored* for the link step invocation, because we couldn't find a "right way" of correctly honoring it that would be logical to the user in all case). https://reviews.llvm.org/D30920

r297972 - [index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes

2017-03-16 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Thu Mar 16 13:25:40 2017 New Revision: 297972 URL: http://llvm.org/viewvc/llvm-project?rev=297972=rev Log: [index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes This enhances the AST to keep track of

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Ah ok, thanks for explaining. In that case, this sounds fine and I'll leave the review to zturner. https://reviews.llvm.org/D30991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30268: Avoid copy of __atoms when char_type is char

2017-03-16 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Ping https://reviews.llvm.org/D30268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. It would be reasonable to *not* forward any flag to the linker (plugin), but not to rewrite them with a different meaning. https://reviews.llvm.org/D30920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D30920#702979, @pirama wrote: > The driver (accepts, but) ignores Os and other optimization flags for non-lto > link-only actions. That it has an effect for LTO is seems to be an > implementation detail. Since optimization flags are

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. In https://reviews.llvm.org/D30991#702965, @thakis wrote: > When you say "cross-compiling", you mean targeting Windows while running on > non-Windows, right? How do dlls get loaded there at all? > > Also, when does clang invoke link.exe? Normally on Windows the linker

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. In https://reviews.llvm.org/D30991#702966, @zturner wrote: > In https://reviews.llvm.org/D30991#702965, @thakis wrote: > > > When you say "cross-compiling", you mean targeting Windows while running on > > non-Windows, right? How do dlls get loaded there at all? > > > >

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 92028. arphaman marked an inline comment as done. arphaman added a comment. Reverse the early exit checks. Repository: rL LLVM https://reviews.llvm.org/D30977 Files: lib/CodeGen/CGObjC.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-16 Thread Florian Gross via Phabricator via cfe-commits
fgross updated this revision to Diff 92026. fgross added a comment. Now using `ASTContext::getParents` instead of `ChainedIfs` map. For some reason I thought of `getParents` as an expensive function to call... https://reviews.llvm.org/D30841 Files:

[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin

2017-03-16 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. In https://reviews.llvm.org/D30920#700741, @mehdi_amini wrote: > In https://reviews.llvm.org/D30920#700574, @hfinkel wrote: > > > In https://reviews.llvm.org/D30920#700557, @mehdi_amini wrote: > > > > > In https://reviews.llvm.org/D30920#700433, @tejohnson wrote: > > > >

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGObjC.cpp:3428 + // CoreFoundation is not used in the code, the linker won't link the + // framework. + auto = getLLVMContext(); rjmccall wrote: > Can you explain why compiler-rt has to load the symbol

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30896#702913, @jbcoe wrote: > I've played around with a few heuristics but it's still far too contentious > to have this check on by default and have it warn in places I want warnings. > Where should it go? Perhaps it should live as

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. In https://reviews.llvm.org/D30991#702965, @thakis wrote: > When you say "cross-compiling", you mean targeting Windows while running on > non-Windows, right? How do dlls get loaded there at all? > > Also, when does clang invoke link.exe? Normally on Windows the linker

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. When you say "cross-compiling", you mean targeting Windows while running on non-Windows, right? How do dlls get loaded there at all? Also, when does clang invoke link.exe? Normally on Windows the linker is invoked directly, no through the compiler driver. Are you using

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. *dynamic loader And that's the cross-compiling link.exes that have those requirements. The native ones have the required dlls in their containing directories. https://reviews.llvm.org/D30991 ___ cfe-commits mailing list

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. In https://reviews.llvm.org/D30991#702941, @thakis wrote: > What env vars are needed here? Reading an env file seems a bit inelegant, > could we pass the values of these env vars as flags instead? > > For example, MSVC2015 needs %INCLUDE%, but for cross-compiling (and

[PATCH] D31044: Update for alloca construction changes

2017-03-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. Herald added a subscriber: wdng. This is enough to fix the build from the alloca construction API changes. More work is needed to be able to really produce code for a target that uses this feature https://reviews.llvm.org/D31044 Files:

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. What env vars are needed here? Reading an env file seems a bit inelegant, could we pass the values of these env vars as flags instead? For example, MSVC2015 needs %INCLUDE%, but for cross-compiling (and for building on Windows without requiring env vars to be set we

[PATCH] D31043: Update for lifetime intrinsic signature change

2017-03-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. Herald added a subscriber: wdng. https://reviews.llvm.org/D31043 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/cleanup-destslot-simple.c test/CodeGen/lifetime-asan.c test/CodeGen/lifetime2.c test/CodeGen/temporary-lifetime-exceptions.cpp

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-16 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I've played around with a few heuristics but it's still far too contentious to have this check on by default and have it warn in places I want warnings. Where should it go? Repository: rL LLVM https://reviews.llvm.org/D30896

[PATCH] D27800: Add overload of TransformToPotentiallyEvaluated for TypeSourceInfo

2017-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/SemaCXX/pr31042.cpp:1 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -disable-free %s + You need to use "-o -" or something like that to avoid generating a file pr31042.ll. Also, a comment

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 92019. hamzasood added a comment. - Added an assertion in Command::Execute to ensure the environment vector is null-terminated before using it. - Split Command::setEnvironment so that there's an overload to specifically handle the case where the input

[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson abandoned this revision. malaperle-ericsson added a comment. Abandoned because of wrong approach. Repository: rL LLVM https://reviews.llvm.org/D31019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a comment. Perfect. Thanks a lot for the explanation! Repository: rL LLVM https://reviews.llvm.org/D31019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31006: [Objective-C] Fix "weak-unavailable" warning with -fobjc-weak

2017-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaCast.cpp:125 + assert(Self.getLangOpts().ObjCAutoRefCount || + Self.getLangOpts().ObjCWeak); Unlike the other patches, we do clearly need to be checking the language options in places

[PATCH] D31034: [X86][AVX512][Clang][Intrinsics] Adding missing intrinsics to Clang .

2017-03-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Headers/avx512fintrin.h:9633 static __inline __m512i __DEFAULT_FN_ATTRS +_mm512_set_epi8 (char e63, char e62, char e61, char e60, char e59, +char e58, char e57, char e56, char e55, char e54, char e53, char e52,

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjC.cpp:3423 +return; + if (!IsOSVersionAtLeastFn) +return; Reverse these checks, please; IsOSVersionAtLeastFn is much cheaper to check and will predominantly be null.

r297961 - [ObjC][Sema] Avoid ARC performSelector error for 'self' selector

2017-03-16 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Mar 16 11:36:11 2017 New Revision: 297961 URL: http://llvm.org/viewvc/llvm-project?rev=297961=rev Log: [ObjC][Sema] Avoid ARC performSelector error for 'self' selector The instance method 'self' does not actually return an over-retained object, so we shouldn't report

[PATCH] D31007: [Objective-C] Miscellaneous -fobjc-weak Fixes

2017-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Same thing about parts of this patch — please try to just check T.hasNonTrivialObjCLifetime() when reasonable. Thank you for all this, by the way. :) https://reviews.llvm.org/D31007 ___ cfe-commits mailing list

[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment. libclang is supposed to be used for bindings to other languages (it's a pure C interface) and its stable. ASTUnit is the C++ side of libclang, libclang is just a thin wrapper around ASTUnit. ASTUnit itself suffers from lots of technical debt because clang changed since

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I have similar feedback here to the other patch. Please try to see if there's some reasonable way to make this dependent just on the lifetime qualifier without paying attention to the language options. If we, say, decide to start supporting __strong in non-ARC

[PATCH] D31003: [Objective-C] C++ Classes with __weak Members non-POD Types when using -fobjc-weak

2017-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/DeclCXX.cpp:727 + !(Context.getLangOpts().ObjCWeak && +T.getObjCLifetime() == Qualifiers::OCL_Weak)) { setHasObjectMember(true); Similarly, I think the best way of expressing this

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2017-03-16 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Since this is only adding a new export to libc++, not changing/breaking existing ones, I don't think it should be grouped with the ABI-breaking changes in v2. The usual promise is that upgrading libc++.so.1 will not break apps compiled against an older set of

[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a subscriber: bkramer. malaperle-ericsson added a comment. In https://reviews.llvm.org/D31019#702631, @bkramer wrote: > It's not. the goal is to get rid of ASTUnit inside of clangd in the long term > as it's a big problem for extensibility. libclang is just a wrapper

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-03-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30158#702760, @madsravn wrote: > In https://reviews.llvm.org/D30158#699342, @jroelofs wrote: > > > In https://reviews.llvm.org/D30158#699132, @madsravn wrote: > > > > > In https://reviews.llvm.org/D30158#698871, @aaron.ballman wrote: > > > >

Re: r297861 - Don't use MSVC Setup Api on MinGW.

2017-03-16 Thread Zachary Turner via cfe-commits
Pretty sure It's the latter. I don't use MinGW enough enough to know how compatible it is with msvc, but this uses a bunch of COM APIs and funny Microsoftisms like declspec(novtable), declspec(uuid), etc, and the MinGW bot was throwing hundreds of compiler errors. If there's a way to make it work

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. I am not sure where to look. I heard somebody say OpenCL has different pointer widths. Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r297861 - Don't use MSVC Setup Api on MinGW.

2017-03-16 Thread Nico Weber via cfe-commits
Should this be a compile-time thing? I thought in general we try to make clang-built-with-msvc and clang-built-with-mingw behave roughly the same except for a different default triple, i.e. maybe this should be keyed off the triple at runtime instead of with a compile-time ifdef. Or do some of the

[PATCH] D31034: [X86][AVX512][Clang][Intrinsics] Adding missing intrinsics to Clang .

2017-03-16 Thread Igor Breger via Phabricator via cfe-commits
igorb created this revision. Adding missing intrinsics : _mm512_set_epi16, _mm512_set_epi8, _mm512_permutevar_epi32 _mm512_mask_permutevar_epi32 Repository: rL LLVM https://reviews.llvm.org/D31034 Files: lib/Headers/avx512fintrin.h test/CodeGen/avx512f-builtins.c Index:

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-03-16 Thread Mads Ravn via Phabricator via cfe-commits
madsravn added a comment. In https://reviews.llvm.org/D30158#699342, @jroelofs wrote: > In https://reviews.llvm.org/D30158#699132, @madsravn wrote: > > > In https://reviews.llvm.org/D30158#698871, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D30158#696534, @madsravn wrote: > > > >

Re: r297890 - enable -save-temps with -finclude-defult-header

2017-03-16 Thread Guansong Zhang via cfe-commits
Many thanks! Regards Guansong On Wed, Mar 15, 2017 at 7:55 PM, Eric Christopher wrote: > Hi Guansong, > > So this wasn't quite the right way to write this testcase. You really > wanted a CHECK/CHECK-NOT line along with the actual commands. You also > didn't want to (as you

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:40-42 + for (auto Iter = ChainedIfs.find(If); Iter != ChainedIfs.end(); + Iter = ChainedIfs.find(Iter->second)) +IfLoc = Iter->second->getIfLoc(); alexfh

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Thank you for the fix! One comment inline. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:40-42 + for (auto Iter = ChainedIfs.find(If); Iter !=

r297956 - Make table cells referring to Clang 4 green, as Clang 4 has been released.

2017-03-16 Thread Ed Schouten via cfe-commits
Author: ed Date: Thu Mar 16 09:21:00 2017 New Revision: 297956 URL: http://llvm.org/viewvc/llvm-project?rev=297956=rev Log: Make table cells referring to Clang 4 green, as Clang 4 has been released. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL:

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. So there is no LLVM supported target with different bit width pointer types? In case we have such a target upstreamed, you can add a test with the host-triple hardcoded into the test. Repository: rL LLVM https://reviews.llvm.org/D31029

[PATCH] D31005: [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

2017-03-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10184 + (!getLangOpts().ObjCAutoRefCount && getLangOpts().ObjCWeak && + VDecl->getType().getObjCLifetime() != Qualifiers::OCL_Weak)) &&

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki created this revision. The Static Analyzer assumed that all pointers had the same bit width. Now pass the type to the 'makeNull' method, to construct a null pointer of the appropiate bit width. Example code that does not work well: int main(void) {   __cm void *cm_p = 0;  

[PATCH] D23610: [ARM] Add pre-defined macros for ROPI and RWPI

2017-03-16 Thread Oliver Stannard via Phabricator via cfe-commits
olista01 updated this revision to Diff 91990. olista01 retitled this revision from "[ARM] Add pre-defined macros for ROPI, RWPI and FPIC" to "[ARM] Add pre-defined macros for ROPI and RWPI". olista01 edited the summary of this revision. Repository: rL LLVM https://reviews.llvm.org/D23610

[PATCH] D23610: [ARM] Add pre-defined macros for ROPI, RWPI and FPIC

2017-03-16 Thread Oliver Stannard via Phabricator via cfe-commits
olista01 added a comment. My patch to the ACLE has now been accepted, so it will be in the next release. This is the wording: __ARM_ROPI is defined to 1 if the translation unit is being compiled in read-only position independent mode. In this mode, all read-only data and functions are at a

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-03-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: lib/Lex/Lexer.cpp:457 +static bool isNewLineEscaped(const char *BufferStart, const char *Str) { + while (Str > BufferStart && isWhitespace(*Str))

r297947 - [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-16 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Thu Mar 16 07:15:10 2017 New Revision: 297947 URL: http://llvm.org/viewvc/llvm-project?rev=297947=rev Log: [OpenCL] Implement as_type operator as alias of __builtin_astype. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential

[PATCH] D30810: Preserve vec3 type.

2017-03-16 Thread JinGu Kang via Phabricator via cfe-commits
jaykang10 added a comment. In https://reviews.llvm.org/D30810#702614, @Anastasia wrote: > In https://reviews.llvm.org/D30810#702443, @bruno wrote: > > > > As a result, I think it would be good for clang to have both of features > > > and I would like to stick to the option "-fpresereve-vec3' to

[PATCH] D30810: Preserve vec3 type.

2017-03-16 Thread JinGu Kang via Phabricator via cfe-commits
jaykang10 added a comment. In https://reviews.llvm.org/D30810#702548, @ahatanak wrote: > In https://reviews.llvm.org/D30810#701141, @jaykang10 wrote: > > > In https://reviews.llvm.org/D30810#701132, @ahatanak wrote: > > > > > Actually, it's not a mis-compile. The record layout shows that there

[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer resigned from this revision. bkramer added a comment. It's not. the goal is to get rid of ASTUnit inside of clangd in the long term as it's a big problem for extensibility. libclang is just a wrapper for ASTUnit, with even more problems. If you want to get completion running, just call

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: lib/Headers/opencl-c.h:6588 -char __ovld __cnfn as_char(char); -char __ovld __cnfn as_char(uchar); - bader wrote: >

  1   2   >