Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-14 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D17981#374553, @etienneb wrote: > This is a huge difference. I didn't expect dependencies to bring so much code. > I'm not a fan of having an empty statement and increasing false positives > ratio. > Would it be possible to skip whole declaration

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-03-14 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:268-290 @@ -265,1 +267,25 @@ + // abi_tag is a gcc attribute, taking one or more strings called "tags". + // + // The goal is to annotate against which version of a library an object was + // build and to be ab

r263816 - [clang-cl] Allow use of -gline-tables-only

2016-03-18 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Mar 18 13:42:56 2016 New Revision: 263816 URL: http://llvm.org/viewvc/llvm-project?rev=263816&view=rev Log: [clang-cl] Allow use of -gline-tables-only Modified: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/test/Driver/cl-options.c Modified: cfe/trunk/include/

Re: [PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

2016-03-19 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D18196#375997, @rjmccall wrote: > You should talk to Reid or someone else involved in MSVC-style EH support to > ensure that they generate a reasonable code pattern for this. I patched this in and verified it works. Clang makes a separate funclet

Re: [PATCH] D18238: [clang-tidy] Fix clang-tidy crashes when using -fdelayed-template-parsing.

2016-03-19 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm, thanks! http://reviews.llvm.org/D18238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

2016-03-19 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D18196#376837, @ahatanak wrote: > I can add another RUN line to test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp > that is identical to the existing RUN line except that it has "-O3 > -disable-llvm-optzns". I confirmed that the test still passes with

r263740 - Revert "For MS ABI, emit dllexport friend functions defined inline in class"

2016-03-19 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 17 15:06:58 2016 New Revision: 263740 URL: http://llvm.org/viewvc/llvm-project?rev=263740&view=rev Log: Revert "For MS ABI, emit dllexport friend functions defined inline in class" This reverts commit r263738. This appears to cause a failure in CXX/temp/temp.decls/temp.

Re: [PATCH] D18199: CodeGen: Implement IR generation for the relative vtable ABI (PR26723).

2016-03-19 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1627 @@ +1626,3 @@ + +llvm::Value *CodeGenFunction::GetVirtualFunctionFromVTable(const CXXRecordDecl *RD, + llvm::Value *VTable, Maybe t

r263738 - For MS ABI, emit dllexport friend functions defined inline in class

2016-03-19 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 17 14:52:20 2016 New Revision: 263738 URL: http://llvm.org/viewvc/llvm-project?rev=263738&view=rev Log: For MS ABI, emit dllexport friend functions defined inline in class Summary: ...as that is apparently what MSVC does Reviewers: rnk Patch by Stephan Bergmann Differ

Re: [PATCH] D13419: Fix several problems at the intersection of template instantiations and visibility

2016-03-19 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM http://reviews.llvm.org/D13419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

Re: [PATCH] D15267: For MS ABI, emit dllexport friend functions defined inline in class

2016-03-19 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263738: For MS ABI, emit dllexport friend functions defined inline in class (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D15267?vs=46227&id=50968#toc Repository: rL LLVM http:

[PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-19 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: rsmith, rtrieu. rnk added a subscriber: cfe-commits. Emit a new warning if such parameters are modified in the body of the constructor. Fixes PR16088. http://reviews.llvm.org/D18271 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/Se

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-20 Thread Reid Kleckner via cfe-commits
rnk added a comment. I'm not sure your example is in scope for -Wshadow, though. Any function call that takes a non-const reference to the parameter could modify it. I guess I'm thinking something like: void trim_in_place(std::string &s); struct A { std::string s; A(std::string s) :

r263947 - clang-cl: support __cdecl-on-struct anachronism

2016-03-21 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Mar 21 11:08:49 2016 New Revision: 263947 URL: http://llvm.org/viewvc/llvm-project?rev=263947&view=rev Log: clang-cl: support __cdecl-on-struct anachronism Summary: The Microsoft compiler emits warning C4229: anachronism used : modifiers on data are ignored for struct

Re: [PATCH] D16628: clang-cl: support __cdecl-on-struct anachronism

2016-03-21 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263947: clang-cl: support __cdecl-on-struct anachronism (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D16628?vs=46228&id=51176#toc Repository: rL LLVM http://reviews.llvm.org/D

Re: [PATCH] D18319: Add a PragmaHandler Registry for plugins to add PragmaHandlers to

2016-03-21 Thread Reid Kleckner via cfe-commits
rnk added a comment. This seems reasonable. Repository: rL LLVM http://reviews.llvm.org/D18319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18328: [CUDA] Add option to mark most functions inside as host+device.

2016-03-21 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:474 @@ +473,3 @@ + SourceLocation Loc = FD.getLocation(); + if (!SM.isInSystemHeader(Loc)) +return false; jlebar wrote: > tra wrote: > > Can C++ library headers ever be non-system? I.e. can someone

Re: [PATCH] D18328: [CUDA] Add option to mark most functions inside as host+device.

2016-03-21 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D18328#379824, @rsmith wrote: > I would much prefer for us to, say, provide a header that wraps the > system one and does something like > > // > #pragma clang cuda_implicit_host_device { > #include_next > #pragma clang cuda_implicit_hos

Re: r263740 - Revert "For MS ABI, emit dllexport friend functions defined inline in class"

2016-03-22 Thread Reid Kleckner via cfe-commits
/2016 09:06 PM, Reid Kleckner via cfe-commits wrote: > >> Author: rnk >> Date: Thu Mar 17 15:06:58 2016 >> New Revision: 263740 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=263740&view=rev >> Log: >> Revert "For MS ABI, emit dllex

Re: [PATCH] D18365: [clang-tidy] Fix broken test with redundant string init (msvc).

2016-03-22 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm http://reviews.llvm.org/D18365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D18271#381769, @rsmith wrote: > I think a reasonable approach would be: "do not warn on shadowing if the > idiom of naming a constructor parameter after a class member is used, and the > class member is initialized from that constructor parameter,

Re: [PATCH] D18430: For MS ABI, emit dllexport friend functions defined inline in class

2016-03-24 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm http://reviews.llvm.org/D18430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r264205 - [CUDA] Don't define __NVCC__.

2016-03-24 Thread Reid Kleckner via cfe-commits
On Thu, Mar 24, 2016 at 8:30 AM, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > This seems like a different tradeoff from the one Clang made for GCC > compatibility (we define all the GCC macros, but then also define others so > people can detect Clang). If people were just

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-03-24 Thread Reid Kleckner via cfe-commits
On Thu, Mar 3, 2016 at 10:40 AM, Aaron Ballman wrote: > That was what I meant by "justification". I would say it has to be > reasonably compelling code (win32 headers, boost, some other major > library) as that's our usual bar for these sort of bug-for-bug > compatible things, as I understand it.

Re: [PATCH] D18454: Fix a missing comma between two string literals.

2016-03-24 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, I'd go ahead and land this. I cc'd Matt Arsenault. He works on AMD GPU stuff. http://reviews.llvm.org/D18454 ___ cfe-commits mailing list cfe-co

r264333 - Revert "Recommitted r263425 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26942 (the fix is included in this commit)."

2016-03-24 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 24 15:38:43 2016 New Revision: 264333 URL: http://llvm.org/viewvc/llvm-project?rev=264333&view=rev Log: Revert "Recommitted r263425 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26942 (the fix is included in this commit)." This r

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-25 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 51697. rnk added a comment. - Address review comments, use a DenseMap instead of redoing lookup http://reviews.llvm.org/D18271 Files: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaDecl

Re: [PATCH] D18304: [DarwinDriver] Increase the number of valid digits for ld version string

2016-03-28 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. Comment at: lib/Driver/Driver.cpp:2541 @@ +2540,3 @@ +/// no extra characters remaining at the end. +bool Driver::GetReleaseVersion(const char *Str, unsigned MaxDigits, + MutableArrayRef Digits) { You don'

r264642 - Paper over the Windows-only enum initialization test failure until the bug is fixed

2016-03-28 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Mar 28 15:13:55 2016 New Revision: 264642 URL: http://llvm.org/viewvc/llvm-project?rev=264642&view=rev Log: Paper over the Windows-only enum initialization test failure until the bug is fixed Modified: cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp Modified:

Re: r264564 - P0138R2: Allow direct-list-initialization of an enumeration from an integral

2016-03-28 Thread Reid Kleckner via cfe-commits
I made the test pass in r264642 with a triple. We should deal with this properly at some point, though. On Sun, Mar 27, 2016 at 11:08 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Mon Mar 28 01:08:37 2016 > New Revision: 264564 > > URL: http://llv

r264651 - Update the description of Clang's MSVC compatibility flags

2016-03-28 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Mar 28 15:42:41 2016 New Revision: 264651 URL: http://llvm.org/viewvc/llvm-project?rev=264651&view=rev Log: Update the description of Clang's MSVC compatibility flags Modified: cfe/trunk/docs/UsersManual.rst Modified: cfe/trunk/docs/UsersManual.rst URL: http://llvm.org

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-03-30 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/AttrDocs.td:1970 @@ +1969,3 @@ + +This modifier makes sense for IPF targets only; Clang supports proper mangling +of the variables with ``unaligned`` modifier, but it doesn't affect generated I don't think

Re: [PATCH] D18304: [DarwinDriver] Increase the number of valid digits for ld version string

2016-03-30 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a reviewer: rnk. rnk added a comment. This revision is now accepted and ready to land. lgtm, go for it Comment at: lib/Driver/Driver.cpp:2549-2550 @@ +2548,4 @@ + unsigned CurDigit = 0; + unsigned MaxDigits = Digits.size(); + while (CurDi

Re: [PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

2016-03-31 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. This revision is now accepted and ready to land. Comment at: include/clang/Driver/Options.td:385 @@ -384,1 +384,3 @@ HelpText<"CUDA installation path">; +def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">, + Group, Fla

Re: [PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

2016-03-31 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/Driver/Options.td:385 @@ -384,1 +384,3 @@ HelpText<"CUDA installation path">; +def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">, + Group, Flags<[CC1Option]>, rnk wrote: > Let

Re: [PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

2016-03-31 Thread Reid Kleckner via cfe-commits
rnk requested changes to this revision. This revision now requires changes to proceed. Comment at: include/clang/Driver/Options.td:385 @@ -384,1 +384,3 @@ HelpText<"CUDA installation path">; +def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">, +

Re: [PATCH] D18747: [Support] Fix an invalid character escaping in string literal (unittest).

2016-04-04 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Lgtm I suppose the test worked fine because it still found the right magic bytes. http://reviews.llvm.org/D18747 ___ cfe-commits mailing list cfe-comm

Re: [PATCH] Windows support for ObjC DLLIMPORT

2016-04-04 Thread Reid Kleckner via cfe-commits
In addition to the Sema tests, this change needs tests in CodeGenObjC to show where the attribute is applied in the IR. --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -2334,5 +2334,9 @@ llvm::Constant *CodeGenModule::getNSConcreteStackBlock() {

r265362 - Fix test failure from r265361

2016-04-04 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Apr 4 18:14:14 2016 New Revision: 265362 URL: http://llvm.org/viewvc/llvm-project?rev=265362&view=rev Log: Fix test failure from r265361 Modified: cfe/trunk/test/CodeGen/align_value.cpp Modified: cfe/trunk/test/CodeGen/align_value.cpp URL: http://llvm.org/viewvc/llvm-

Re: [PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

2016-04-05 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Yep, lgtm http://reviews.llvm.org/D18671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: [PATCH] D18843: Always have clang pass -pie-level and -pic-level values to the code generator

2016-04-06 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm There are similar flags, like -O, which define preprocessor macros and get fed to the backend. In that case, we actually have duplicate LangOpts and CodeGenOpts. I don't think we need to do th

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-07 Thread Reid Kleckner via cfe-commits
rnk added a comment. We had a conversation about this change around the office the other week, and people were concerned about false negatives like the trim_in_place one. Basically, I don't have time to discover all the ways you can modify your parameters: struct B { A a; B(A a) : a(

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-07 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 52982. rnk marked 3 inline comments as done. rnk added a comment. - Add -Wshadow-all and -Wshadow-field-in-constructor, also address review comments http://reviews.llvm.org/D18271 Files: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticGroups

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-07 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDecl.cpp:6489-6490 @@ +6488,4 @@ + ShadowedDeclKind Kind = computeShadowedDeclKind(ShadowedDecl, OldDC); + Diag(Loc, diag::warn_modifying_shadowing_decl) << D << Kind << OldDC; + Diag(ShadowedDecl->getLocation(), diag::note_pr

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-07 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 52983. rnk added a comment. - Add a test for -Wshadow-all http://reviews.llvm.org/D18271 Files: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/Anal

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-07 Thread Reid Kleckner via cfe-commits
On Thu, Apr 7, 2016 at 5:12 PM, David Blaikie wrote: > On Thu, Apr 7, 2016 at 5:05 PM, Reid Kleckner via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> rnk updated this revision to Diff 52982. >> rnk marked 3 inline comments as done. >> rnk added a comm

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-08 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: test/SemaCXX/MicrosoftExtensions.cpp:89 @@ -84,1 +88,3 @@ +void foo_unaligned(int arg) {} +void foo_unaligned(__unaligned int *arg) {} Surely we can come up with some tougher overloading test cases. I noticed MSVC generate

r265963 - Update getting started docs

2016-04-11 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Apr 11 12:02:34 2016 New Revision: 265963 URL: http://llvm.org/viewvc/llvm-project?rev=265963&view=rev Log: Update getting started docs compiler-rt is optional. We often get email from users with compiler-rt build errors who don't actually need compiler-rt. Marking it option

Re: [PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported

2016-04-11 Thread Reid Kleckner via cfe-commits
rnk added a comment. Richard, do you think we should be handling this by rewriting the AST-level attribute in Sema or by changing our interpretation of things in CodeGen? We're already creating a bunch of implicit attributes to implement class-level import/export. Comment at:

Re: [PATCH] D19056: [MSVC] Fix check for wchar_t type in case of -fno-wchar

2016-04-13 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: test/SemaCXX/no-wchar.cpp:12 @@ +11,2 @@ +void foo1(wchar_t * t = L""); +// expected-warning@-1 {{conversion from string literal to 'wchar_t *' (aka 'unsigned shor

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-13 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Thanks! This looks great. Comment at: test/SemaCXX/MicrosoftExtensions.cpp:89 @@ +88,3 @@ +void foo_unaligned(int *arg) {} +void foo_unaligned(__unaligned int *arg) {} +void foo_una

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-13 Thread Reid Kleckner via cfe-commits
rnk added a comment. ping http://reviews.llvm.org/D18271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r266263 - [CodeGen] Avoid ctor/dtor boilerplate with some C++11

2016-04-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Apr 13 18:37:17 2016 New Revision: 266263 URL: http://llvm.org/viewvc/llvm-project?rev=266263&view=rev Log: [CodeGen] Avoid ctor/dtor boilerplate with some C++11 Non-owning pointers that cache LLVM types and constants can use 'nullptr' default member initializers so that we

Re: [PATCH] D19072: [CodeGen] Split CGDebugInfo into CGDebugInfo and CGDebugDwarf

2016-04-13 Thread Reid Kleckner via cfe-commits
rnk marked 2 inline comments as done. Comment at: lib/CodeGen/CodeGenModule.h:292 @@ -291,3 +291,3 @@ CGCUDARuntime* CUDARuntime; - CGDebugInfo* DebugInfo; + std::unique_ptr DebugInfo; ObjCEntrypoints *ObjCData; echristo wrote: > aprantl wrote: > > This co

Re: [PATCH] D18956: [Sema] Fix assertion failure at vector comparison

2016-04-14 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. I think Sema::CheckVectorOperands isn't supposed to return a scalar type. Fixing that with http://reviews.llvm.org/D19123 also solves this problem. Richard, WDYT? Repository: rL LLVM http://reviews.llvm.org/D18956

[PATCH] D19123: In vector comparisons, handle scalar LHS just as we handle scalar RHS

2016-04-14 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added a reviewer: rsmith. rnk added a subscriber: cfe-commits. Fixes PR27258 http://reviews.llvm.org/D19123 Files: lib/Sema/SemaExpr.cpp test/CodeGen/vector.c Index: test/CodeGen/vector.c === ---

r266366 - In vector comparisons, handle scalar LHS just as we handle scalar RHS

2016-04-14 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Apr 14 16:03:38 2016 New Revision: 266366 URL: http://llvm.org/viewvc/llvm-project?rev=266366&view=rev Log: In vector comparisons, handle scalar LHS just as we handle scalar RHS Summary: Fixes PR27258 Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http:

Re: [PATCH] D19123: In vector comparisons, handle scalar LHS just as we handle scalar RHS

2016-04-14 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266366: In vector comparisons, handle scalar LHS just as we handle scalar RHS (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D19123?vs=53745&id=53782#toc Repository: rL LLVM htt

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-15 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDecl.cpp:6417-6425 @@ +6416,11 @@ +if (isa(NewDC) && isa(D)) { + if (Diags.isIgnored(diag::warn_ctor_parm_shadows_field, R.getNameLoc())) { +D = D->getCanonicalDecl(); +ShadowingDecls.insert({D, FD}); +

Re: [PATCH] D19072: [CodeGen] Split CGDebugInfo into CGDebugInfo and CGDebugDwarf

2016-04-18 Thread Reid Kleckner via cfe-commits
rnk added a comment. ping http://reviews.llvm.org/D19072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19072: [CodeGen] Split CGDebugInfo into CGDebugInfo and CGDebugDwarf

2016-04-18 Thread Reid Kleckner via cfe-commits
rnk marked an inline comment as done. Comment at: lib/CodeGen/CGDebugInfo.h:97 @@ -273,3 +96,3 @@ /// Set the main CU's DwoId field to \p Signature. - void setDwoId(uint64_t Signature); + virtual void setDwoId(uint64_t Signature) = 0; aprantl wrote: > Why d

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-19 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 54206. rnk added a comment. - Address review comments - Add -Wshadow-all and -Wshadow-field-in-constructor, also address review comments - Warn twice under -Wshadow-all if a shadowing parameter is modified http://reviews.llvm.org/D18271 Files: include/clang/

Re: [PATCH] D19156: [ms][dll] #27212: Generating of implicit special members should take into account MSVC compatibility version

2016-04-20 Thread Reid Kleckner via cfe-commits
rnk requested changes to this revision. rnk added a comment. This revision now requires changes to proceed. As mentioned twice in https://llvm.org/bugs/show_bug.cgi?id=27212, I don't think this is the right direction. To my knowledge, this only causes an ABI break when importing a class. I think

Re: [PATCH] D19253: [Tooling] Fix getting fully qualified names of template alias types.

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

Re: [PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported

2016-04-20 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think this generally seems right, but we should make sure our behavior is more consistent in the case of a template definition. Comment at: lib/Sema/SemaDecl.cpp:5570-5571 @@ -5565,4 +5569,4 @@ // exceptions being inline function definitions, local ext

r267186 - Fix a bug involving deferred decl emission and PCH

2016-04-22 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Apr 22 13:46:33 2016 New Revision: 267186 URL: http://llvm.org/viewvc/llvm-project?rev=267186&view=rev Log: Fix a bug involving deferred decl emission and PCH For various reasons, involving dllexport and class linkage compuations, we have to wait until after the semicolon af

Re: r267186 - Fix a bug involving deferred decl emission and PCH

2016-04-22 Thread Reid Kleckner via cfe-commits
On Fri, Apr 22, 2016 at 12:29 PM, Richard Smith wrote: > On Fri, Apr 22, 2016 at 11:46 AM, Reid Kleckner via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rnk >> Date: Fri Apr 22 13:46:33 2016 >> New Revision: 267186 >> >> URL: h

Re: [PATCH] D19479: 26748 - clang-cl fails to compile atlctrlw.h header from WTL

2016-04-25 Thread Reid Kleckner via cfe-commits
rnk requested changes to this revision. rnk added a comment. This revision now requires changes to proceed. We definitely should not rely on typo correction or other error recovery mechanisms to do this for us. Otherwise we can end up accepting ill-formed programs like this one: struct MyStru

Re: [PATCH] D19477: [MSVC] PR27337: allow static_cast from private base to derived for WTL

2016-04-25 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5768 @@ +5767,3 @@ +def ext_ms_downcast_from_inaccessible_base : ExtWarn< + "cast %select{private|protected}2 base class

Re: [PATCH] D19459: Cleanup redundant expression in InstCombineAndOrXor.

2016-04-25 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm FYI David Majnemer is a good reviewer for InstCombine. http://reviews.llvm.org/D19459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

Re: [PATCH] D19425: driver: Add a `--rsp-quoting` flag to choose which unquoting behavior to use in rsp files.

2016-04-25 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Looks good Comment at: tools/driver/driver.cpp:350 @@ +349,3 @@ + for (const char *F : argv) { +if (strcmp(F, "--rsp-quoting=posix") == 0) + RSPQuoting = POSIX; --

Re: [PATCH] D19425: driver: Add a `--rsp-quoting` flag to choose which unquoting behavior to use in rsp files.

2016-04-25 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: tools/driver/driver.cpp:350 @@ +349,3 @@ + for (const char *F : argv) { +if (strcmp(F, "--rsp-quoting=posix") == 0) + RSPQuoting = POSIX; thakis wrote: > rnk wrote: > > Should we call it "posix" or "gnu"? The refere

Re: r267186 - Fix a bug involving deferred decl emission and PCH

2016-04-25 Thread Reid Kleckner via cfe-commits
On Fri, Apr 22, 2016 at 1:58 PM, Richard Smith wrote: > > This seems like a fragile thing to rely on. What about template > instantiation performed at end of TU? (I /think/ that case is currently > fine because all the kinds of template we instantiate ultimately do result > in a call to HandleTopL

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-26 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 55044. rnk added a comment. - Implement suggestions to avoid warning twice http://reviews.llvm.org/D18271 Files: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.

Re: [PATCH] D19275: Do not register incompatible C++ destructors with __cxa_atexit

2016-04-27 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. +1 for canCallMismatchedFunctionType. I guess there's a more general issue here which is that LLVM appears to be more permissive about prototype mismatch than wasm. Specifically, I'm thinking about how swifterror relies on being able to pass ext

Re: [PATCH] D19361: [MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)

2016-04-27 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks this is a nice cleanup! Comment at: include/clang/Sema/Sema.h:338-342 @@ +337,7 @@ +PSK_Reset = 0x0,// #pragma () +PSK_Set = 0x1,

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-27 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 55359. rnk added a comment. - address comments http://reviews.llvm.org/D18271 Files: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/AnalysisBasedWa

Re: [PATCH] D19687: Set PIELevel module flag

2016-04-28 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/CodeGen/CodeGenModule.cpp:492-498 @@ +491,9 @@ + if (uint32_t PLevel = Context.getLangOpts().PIELevel) { +llvm::PIELevel::Level PL = llvm::PIELevel::Defaul

Re: [PATCH] D19687: Set PIELevel module flag

2016-04-28 Thread Reid Kleckner via cfe-commits
rnk added a comment. still lgtm Comment at: lib/CodeGen/CodeGenModule.cpp:480 @@ -479,8 +479,3 @@ if (uint32_t PLevel = Context.getLangOpts().PICLevel) { -llvm::PICLevel::Level PL = llvm::PICLevel::Default; -switch (PLevel) { -case 0: break; -case 1: PL = llvm

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-28 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL267957: Avoid -Wshadow warnings about constructor parameters named after fields (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D18271?vs=55359&id=55515#toc Repository: rL LLVM h

r267957 - Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-28 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Apr 28 19:37:43 2016 New Revision: 267957 URL: http://llvm.org/viewvc/llvm-project?rev=267957&view=rev Log: Avoid -Wshadow warnings about constructor parameters named after fields Usually these parameters are used solely to initialize the field in the initializer list, and t

Re: [PATCH] D19721: Fix crash in BuildCXXDefaultInitExpr.

2016-04-29 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: test/SemaCXX/pr27047-default-init-expr-name-conflict.cpp:6 @@ +5,3 @@ +template +struct B { + More reduced: template struct A { int A = 0; };

Re: [PATCH] D19727: [MS] Improved implementation #pragma pack (MS pragmas, part 2)

2016-04-29 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: include/clang/Sema/Sema.h:354-357 @@ -356,6 +353,6 @@ }; void Act(SourceLocation PragmaLocation, PragmaMsStackAction Action, l

r268082 - Fix crash in BuildCXXDefaultInitExpr.

2016-04-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Apr 29 13:06:53 2016 New Revision: 268082 URL: http://llvm.org/viewvc/llvm-project?rev=268082&view=rev Log: Fix crash in BuildCXXDefaultInitExpr. Fix crash in BuildCXXDefaultInitExpr when member of template class has same name as the class itself. Based on patch by Raphael

Re: [PATCH] D19721: Fix crash in BuildCXXDefaultInitExpr.

2016-04-29 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL268082: Fix crash in BuildCXXDefaultInitExpr. (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D19721?vs=55580&id=55631#toc Repository: rL LLVM http://reviews.llvm.org/D19721 Fil

Re: [PATCH] D19749: Delete store to Target option PositionIndependentExecutable

2016-04-29 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm http://reviews.llvm.org/D19749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19756: Expand aggregate arguments more often on 32-bit Windows

2016-04-29 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: majnemer, hans. rnk added a subscriber: cfe-commits. Before this change, we would pass all non-HFA record arguments on Windows with byval. Byval often blocks optimizations and results in bad code generation. Windows now uses the existing workaround t

Re: [PATCH] D19756: Expand aggregate arguments more often on 32-bit Windows

2016-05-02 Thread Reid Kleckner via cfe-commits
rnk marked an inline comment as done. rnk added a comment. In http://reviews.llvm.org/D19756#417718, @hans wrote: > This is awesome! lgtm Great! > Want to reference PR27522 in the patch description? > > Also in the description: > > > I also expanded the workaround handle C++ records with

r268261 - Expand aggregate arguments more often on 32-bit Windows

2016-05-02 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon May 2 12:41:07 2016 New Revision: 268261 URL: http://llvm.org/viewvc/llvm-project?rev=268261&view=rev Log: Expand aggregate arguments more often on 32-bit Windows Before this change, we would pass all non-HFA record arguments on Windows with byval. Byval often blocks optimi

Re: [PATCH] D19756: Expand aggregate arguments more often on 32-bit Windows

2016-05-02 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL268261: Expand aggregate arguments more often on 32-bit Windows (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D19756?vs=55695&id=55845#toc Repository: rL LLVM http://reviews.ll

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-02 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. I think threading this through PP options is reasonable. Comment at: test/PCH/pragma-once.h:1 @@ +1,2 @@ +#pragma once + This should be in test/PCH/Inputs http://reviews.llvm.org/D19815 _

r268321 - Fix argument expansion of reference fields of structs

2016-05-02 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon May 2 17:42:34 2016 New Revision: 268321 URL: http://llvm.org/viewvc/llvm-project?rev=268321&view=rev Log: Fix argument expansion of reference fields of structs r268261 made Clang "expand" more struct arguments on Windows. It removed the check for 'RD->isCLike()', which was

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-05-03 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think Richard has a counterexample that shows that the "NullOut" approach to computing abi_tag sets isn't the right way to go. I wasn't able to craft it myself, but I figured I should send along the feedback that maybe a separate, up-front pass over the return type with a

r268418 - [MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall

2016-05-03 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 3 13:44:29 2016 New Revision: 268418 URL: http://llvm.org/viewvc/llvm-project?rev=268418&view=rev Log: [MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall If we are devirtualizing, then we want to compute the 'this' adjustment of the devirtualized target, n

r268419 - Fix use of LLVM IR names in lit test

2016-05-03 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 3 13:48:50 2016 New Revision: 268419 URL: http://llvm.org/viewvc/llvm-project?rev=268419&view=rev Log: Fix use of LLVM IR names in lit test Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-v

r268473 - [X86] Add -malign-double support

2016-05-03 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 3 21:58:24 2016 New Revision: 268473 URL: http://llvm.org/viewvc/llvm-project?rev=268473&view=rev Log: [X86] Add -malign-double support The -malign-double flag causes i64 and f64 types to have alignment 8 instead of 4. On x86-64, the behavior of -malign-double is enable

Re: [PATCH] D19827: Do not disable completely loop unroll when optimizing for size.

2016-05-04 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk accepted this revision. rnk added a reviewer: rnk. rnk added a comment. This revision is now accepted and ready to land. lgtm To be clear, loop unrolling just lowers its size threshold when -Os is on: // Apply size attributes if (L->getHeader()->getParent()->

Re: [PATCH] D19654: PR27132: Proper mangling for __unaligned qualifier (now with PR27367 fixed)

2016-05-04 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1583-1584 @@ -1579,2 +1582,4 @@ case QMM_Result: +// Presence of __unaligned qualifier shouldn't affect mangling here. +Quals.removeUnaligned(); if ((!IsPointer && Quals) || isa(T)) { --

Re: r268594 - Fix implementation of C++'s restrictions on using-declarations referring to enumerators:

2016-05-05 Thread Reid Kleckner via cfe-commits
FYI, this change broke bionic, which has this exact pattern: https://android.googlesource.com/platform/bionic/+/master/tools/relocation_packer/src/debug.h#84 struct A { enum E { X = 3 }; }; typedef A::E T; using T::X; I expect users are going to have lots of issues with this, and it proba

Re: r268594 - Fix implementation of C++'s restrictions on using-declarations referring to enumerators:

2016-05-05 Thread Reid Kleckner via cfe-commits
On Thu, May 5, 2016 at 11:15 AM, Richard Smith wrote: > Given that GCC rejects this code (and has done for as long as it's > accepted the Enum::Member syntax), I don't expect the problems to be too > widespread. If they are, we could trivially accept this as an extension; it > seems like a pointl

<    3   4   5   6   7   8   9   10   11   >