r297931 - clang-format: Fix bug in wrapping behavior of operators.

2017-03-16 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Mar 16 02:54:11 2017 New Revision: 297931 URL: http://llvm.org/viewvc/llvm-project?rev=297931&view=rev Log: clang-format: Fix bug in wrapping behavior of operators. Before (even violating the column limit): auto Diag = diag() << (aaa

[PATCH] D30931: [clang-tidy] added new identifier naming case type for ignoring case style

2017-03-16 Thread Juliusz Toczydłowski via Phabricator via cfe-commits
jutocz added a comment. You are right, it does look misleading. I'll try to modify it the way you suggest (though I'm new to LLVM, so be ready to give me more comments;). https://reviews.llvm.org/D30931 ___ cfe-commits mailing list cfe-commits@list

[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 91977. arphaman marked an inline comment as done. arphaman added a comment. The guard function is now `hidden`. I also adopted linker options as John suggested. Repository: rL LLVM https://reviews.llvm.org/D30977 Files: lib/CodeGen/CGObjC.cpp lib/C

[PATCH] D30931: [clang-tidy] added new identifier naming case type for ignoring case style

2017-03-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D30931#702578, @jutocz wrote: > You are right, it does look misleading. I'll try to modify it the way you > suggest (though I'm new to LLVM, so be ready to give me more comments;) Sure, thank you for the work! https://reviews.llvm.org/D3093

[PATCH] D27800: Add overload of TransformToPotentiallyEvaluated for TypeSourceInfo

2017-03-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 91980. pmatos marked an inline comment as done. https://reviews.llvm.org/D27800 Files: include/clang/Sema/Sema.h lib/Sema/SemaExpr.cpp test/SemaCXX/pr31042.cpp Index: test/SemaCXX/pr31042.cpp

[PATCH] D30932: [clang-format] disabled adding extra space after MSVC '__super' keyword

2017-03-16 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297936: [clang-format] disable adding extra space after MSVC '__super' keyword (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D30932?vs=91733&id=91982#toc Repository: rL LLV

r297936 - [clang-format] disable adding extra space after MSVC '__super' keyword

2017-03-16 Thread Martin Probst via cfe-commits
Author: mprobst Date: Thu Mar 16 05:21:35 2017 New Revision: 297936 URL: http://llvm.org/viewvc/llvm-project?rev=297936&view=rev Log: [clang-format] disable adding extra space after MSVC '__super' keyword clang-format treats MSVC `__super` keyword like all other keywords adding a single space aft

[PATCH] D30932: [clang-format] disabled adding extra space after MSVC '__super' keyword

2017-03-16 Thread Martin Probst via Phabricator via cfe-commits
mprobst added a comment. @jutocz done, thanks for the patch! Repository: rL LLVM https://reviews.llvm.org/D30932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30810: Preserve vec3 type.

2017-03-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. 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 change the > > behavior easily. > > The motivation doesn't seem soli

[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: > Anastasia

[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] 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 is

[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

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&view=rev Log: [OpenCL] Implement as_type operator as alias of __builtin_astype. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: cfe-commits, yaxunl, bader Different

[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)) +

[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 l

[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 File

[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] 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)) && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak

[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 _

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&view=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: ht

[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 !=

[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 wr

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 noticed later) depen

[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: > > > >

[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: test/

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] 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 http://lists.llvm

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 I

[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: > > > >

[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 for

[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 headers,

[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 i

[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 modes,

[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] 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 cfe-commit

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&view=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 repo

[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. Comment

[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] 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 li

[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] 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 http://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 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 vect

[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 explai

[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] 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 test/CodeGen/tempora

[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 adde

[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: lib/CodeGen/CGBuiltin.cpp

[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] 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 c

[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 c

[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 is

[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] 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 &Context = getLLVMContext(); rjmccall wrote: > Can you explain why compiler-rt has to load the

[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] 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: clang-tidy/readability/MisleadingIndentatio

[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] 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? > > > > A

[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] 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 com

[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 http://l

[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] 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 http://lists.llvm.org/cgi-bin/mailman

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&view=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 lo

[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 __

[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 &NewEnvironment); + Since it's just a vector of

[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 + // ad

[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 interes

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&view=rev Log: [AST] Follow-up to r297972, add default value for setGetterName/setSetterName if a source-loc is not provided. Fixes lldb build. Modified: cfe/trunk/inclu

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&view=rev Log: Use arg_begin() instead of getArgumentList().begin(), the argument list is an implementation detail Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified:

[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 here:

[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] 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 > > (O0/https://reviews.llvm.org/ow

[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 o

[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 e

[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] 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 http://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 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 http://lists.llvm.org/cg

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&view=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 Rev

[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 i

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&view=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:

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

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&view=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

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&view=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. rdar://probl

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 :: ASTMerge

[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 https://reviews.llvm.

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/

[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 extension

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. > > >

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 seems the > compiler cr

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 mailto:revi...@reviews.llvm.org>> wrote: hfinkel added a comment. In https://reviews.llvm.org/D30415#703398, @echristo wrote: > Different suggestion: > > Remove t

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&view=rev Log: Remove setting LessPreciseFPMADOption on the TargetOption as it's unused anywhere in llvm. Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp Modified: cfe/trun

[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

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&view=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 b

[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 &Error, Please add some descrip

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 sending to the submitter, Argyrios] >> >>

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 https://reviews.llvm.org/D30415#703398, @echristo wrote

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 getter=/s

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&view=rev > Log: > [Serializatio

[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 = nullpt

  1   2   >