Re: [PATCH] D11896: [clang-cl] Add support for CL and _CL_ environment variables

2015-08-10 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: tools/driver/driver.cpp:464-466 @@ +463,5 @@ + PrependedOpts); + // Insert right after the program name to prepend to

Re: [PATCH] D11896: [clang-cl] Add support for CL and _CL_ environment variables

2015-08-10 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: tools/driver/driver.cpp:451 @@ +450,3 @@ + if (Tokenizer == &llvm::cl::TokenizeWindowsCommandLine) { +// The first instance of '#' should be replaced with '='. +auto AdjustOpt = [] (const char *Opt) { I'd also rather

[PATCH] D11913: [dllimport] A non-imported class with an imported key can't have a key

2015-08-10 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: majnemer, hans. rnk added a subscriber: cfe-commits. The vtable takes its DLL storage class from the class, not the key function. When they disagree, the vtable won't be exported by the DLL that defines the key function. The easiest way to ensure tha

Re: [PATCH] D11913: [dllimport] A non-imported class with an imported key can't have a key

2015-08-10 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL244488: [dllimport] A non-imported class with an imported key can't have a key (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D11913?vs=31697&id=31710#toc Repository: rL LLVM ht

r244488 - [dllimport] A non-imported class with an imported key can't have a key

2015-08-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Aug 10 14:39:01 2015 New Revision: 244488 URL: http://llvm.org/viewvc/llvm-project?rev=244488&view=rev Log: [dllimport] A non-imported class with an imported key can't have a key Summary: The vtable takes its DLL storage class from the class, not the key function. When they

r275826 - [clang-cl] Reinstate -gline-tables-only as a CoreOption while we sort out the fate of /Zd

2016-07-18 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Jul 18 12:49:40 2016 New Revision: 275826 URL: http://llvm.org/viewvc/llvm-project?rev=275826&view=rev Log: [clang-cl] Reinstate -gline-tables-only as a CoreOption while we sort out the fate of /Zd Modified: cfe/trunk/include/clang/Driver/Options.td Modified: cfe/trunk

Re: [PATCH] D22426: Fix automatic detection of ARM MSVC toolset in clang.exe

2016-07-18 Thread Reid Kleckner via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D22426#486129, @DaveBartolomeo wrote: > One reasonable solution would be to choose the toolset that is hosted on the > same architecture as the host of clang.exe (e.g. x64-hosted Clang looks for > x64-hosted MSVC). If this sounds good, I can make

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-18 Thread Reid Kleckner via cfe-commits
rnk added a comment. The approach makes sense to me, but the tests suggest it isn't doing what I'd expect. Comment at: test/CodeGenCXX/dllimport-rtti.cpp:7 @@ -6,3 +6,1 @@ } s; -// MSVC: [[VF_S:.*]] = private unnamed_addr constant [2 x i8*] -// MSVC-DAG: @"\01??_SS@@6B@" = unn

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-19 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: test/CodeGenCXX/dllimport-rtti.cpp:7 @@ -6,3 +6,1 @@ } s; -// MSVC: [[VF_S:.*]] = private unnamed_addr constant [2 x i8*] -// MSVC-DAG: @"\01??_SS@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* [[VF_S]], i32 0

r276120 - [MS] Improve VPtrInfo field names and doc comments

2016-07-20 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jul 20 09:40:25 2016 New Revision: 276120 URL: http://llvm.org/viewvc/llvm-project?rev=276120&view=rev Log: [MS] Improve VPtrInfo field names and doc comments 'ReusingBase' was a terrible name. It might actually refer to the most derived class, which is not a base. 'BaseWith

Re: [PATCH] D22577: Include unreferenced nested types in member list only for CodeView

2016-07-20 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:1096 @@ +1095,3 @@ + QualType Ty = CGM.getContext().getTypeDeclType(RD); + llvm::DIType *nestedType = getOrCreateType(Ty, getOrCreateMainFile()); + elements.push_back(nestedType); Is getOrCreate

Re: [PATCH] D22577: Include unreferenced nested types in member list only for CodeView

2016-07-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 https://reviews.llvm.org/D22577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r276335 - Disable a flaky test on Windows that uses "echo >>"

2016-07-21 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Jul 21 16:07:47 2016 New Revision: 276335 URL: http://llvm.org/viewvc/llvm-project?rev=276335&view=rev Log: Disable a flaky test on Windows that uses "echo >>" Modified: cfe/trunk/test/Modules/embed-files.cpp Modified: cfe/trunk/test/Modules/embed-files.cpp URL: http:/

Re: [PATCH] D21385: Adjust Registry interface to not require plugins to export a registry

2016-07-26 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 https://reviews.llvm.org/D21385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

Re: [PATCH] D22879: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment.

2016-07-27 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: test/CodeGenCUDA/kernel-args-alignment.cu:1-2 @@ +1,3 @@ +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target + Typically clang doesn't need a registered backend for a target to generate IR for that targ

Re: [PATCH] D22879: [CUDA] Align kernel launch args correctly when the LLVM type's alignment is different from the clang type's alignment.

2016-07-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 https://reviews.llvm.org/D22879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D22920: [codeview] Emit information about vftables

2016-07-28 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: amccarth, aprantl, dblaikie, dexonsmith. rnk added a subscriber: cfe-commits. rnk added a dependency: D22884: [codeview] Emit vftable records. MSVC emits codeview records describing all the methods contained in a vftable. This is observable in windbg

Re: [PATCH] D22931: Add __declspec code_seg support

2016-07-28 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. Needs tests, though. The MSDN sample code is probably a good starting point. Comment at: lib/Sema/SemaDeclAttr.cpp:2659 @@ -2658,1 +2658,3 @@ + // code_seg only ever applies to functions. + if (Attr.getName()->getName() == "c

r277205 - Fix naked.cpp test on 32-bit Windows

2016-07-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Jul 29 14:43:28 2016 New Revision: 277205 URL: http://llvm.org/viewvc/llvm-project?rev=277205&view=rev Log: Fix naked.cpp test on 32-bit Windows Modified: cfe/trunk/test/CodeGenCXX/naked.cpp Modified: cfe/trunk/test/CodeGenCXX/naked.cpp URL: http://llvm.org/viewvc/llvm

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-08-01 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think the correctness problem is in DSE. It should be safe for clang to put 'tail' here. The tail call does not capture the address of any local variables, but it does load from them via 'byval'. https://reviews.llvm.org/D22900

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-08-01 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think Nick was responsible for adding this DSE optimization *years* ago. https://reviews.llvm.org/D22900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r277367 - [codeview] Skip injected class names in nested record emission

2016-08-01 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Aug 1 13:56:13 2016 New Revision: 277367 URL: http://llvm.org/viewvc/llvm-project?rev=277367&view=rev Log: [codeview] Skip injected class names in nested record emission We were already trying to do this, but our check wasn't quite right. Fixes PR28790 Added: cfe/trun

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-08-01 Thread Reid Kleckner via cfe-commits
rnk added a comment. So, if clang were to use a temporary alloca for the byval parameter, then yes, I agree marking it as a tail call would be incorrect. However, clang doesn't use an alloca, it forwards the byval pointer parameter directly to the callee: define i32 @_ZThn4_N1C4SeekE6_LARGE(%

Re: [PATCH] D23105: [clang/test] Fix a flaky unittest on windows

2016-08-03 Thread Reid Kleckner via cfe-commits
rnk added a comment. Thanks! lgtm Repository: rL LLVM https://reviews.llvm.org/D23105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r278139 - [clang-cl] Make -gline-tables-only imply -gcodeview

2016-08-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Aug 9 12:23:56 2016 New Revision: 278139 URL: http://llvm.org/viewvc/llvm-project?rev=278139&view=rev Log: [clang-cl] Make -gline-tables-only imply -gcodeview It's surprising that you have to pass /Z7 in addition to -gcodeview to get debug info. The sanitizer runtime, for e

Re: [PATCH] D23409: Make clang-tidy work with clang-cl

2016-08-11 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Driver/Driver.cpp:93 @@ +92,3 @@ + ArrayRef Args) { + auto Default = ToolChain::getTargetAndModeFromProgramName(ProgramName); + StringRef DefaultMode(Default.second); Why not change ToolInvoc

Re: [PATCH] D23454: [Driver] Set the default clang driver mode based on the executable

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

Re: [PATCH] D23455: [Tooling] Parse compilation database command lines properly on Windows

2016-08-12 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. We should convince cmake to emit "arguments" instead of "command" so that we don't have this ambiguity. https://reviews.llvm.org/D23455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

Re: [PATCH] D23241: Add the notion of deferred diagnostics.

2016-08-12 Thread Reid Kleckner via cfe-commits
rnk added a comment. Sorry for the delay, was trying to stay focused on debugging Comment at: clang/include/clang/AST/Decl.h:1647 @@ +1646,3 @@ + /// clears this list) needs to be a logically-const operation. + mutable std::unique_ptr> DeferredDiags; + Decl me

Re: [PATCH] D23455: [Tooling] Parse compilation database command lines properly on Windows

2016-08-15 Thread Reid Kleckner via cfe-commits
rnk added a comment. +cmake people for the feasibility of emitting 'arguments' instead of 'command' into the JSON compilation database. https://reviews.llvm.org/D23455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

Re: [PATCH] D23455: [Tooling] Parse compilation database command lines properly on Windows

2016-08-15 Thread Reid Kleckner via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D23455#515486, @brad.king wrote: > > the feasibility of emitting 'arguments' instead of 'command' into the JSON > > compilation database. > > > CMake constructs the command lines internally using string replacement on > templates. We never actua

Re: [PATCH] D23241: Add the notion of deferred diagnostics.

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

Re: [PATCH] D16770: [MS] PR26234: Allow typedef redefinition of equally qualified, sized and aligned types in C

2016-02-01 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/AST/ASTContext.h:1771-1782 @@ -1770,1 +1770,14 @@ + /// Return true is the given types are compatible in C from MSVC's point of + /// view. + // + // Conditions: + // 1. Both types are equally-qualified, sized and align

Re: [PATCH] D16779: Fix attribute((mode([word|unwind_word]))) for x32

2016-02-01 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Should I land this for you? http://reviews.llvm.org/D16779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

r259383 - Fix attribute((mode([word|unwind_word]))) for x32

2016-02-01 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Feb 1 12:58:24 2016 New Revision: 259383 URL: http://llvm.org/viewvc/llvm-project?rev=259383&view=rev Log: Fix attribute((mode([word|unwind_word]))) for x32 Patch by H.J. Lu ``` typedef unsigned int gcc_word __attribute__((mode(word))); ``` and ``` typedef unsigned int gc

Re: [PATCH] D16779: Fix attribute((mode([word|unwind_word]))) for x32

2016-02-01 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259383: Fix attribute((mode([word|unwind_word]))) for x32 (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D16779?vs=46558&id=46559#toc Repository: rL LLVM http://reviews.llvm.org

Re: [PATCH] D16808: [MCU] PR26438: Fix assertion failure on function returning an empty struct or union

2016-02-02 Thread Reid Kleckner via cfe-commits
rnk added a comment. If the ABI is still open to small changes and clarifications, can we make sure that C and C++ empty structs are passed the same way? Unfortunately, on normal x86_64 SysV GCC doesn't pass them the same way and Clang has to follow suit. http://reviews.llvm.org/D16808

Re: [PATCH] D16770: [MS] PR26234: Allow typedef redefinition of equally qualified, sized and aligned types in C

2016-02-03 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/AST/ASTContext.h:1772-1783 @@ -1771,1 +1771,14 @@ + /// Return true is the given typedef types are compatible in C from MSVC's + /// point of view. + // + // Conditions: + // 1. Both typedef types are either integer, en

Re: [PATCH] D16626: [x86] Correct setting of WIntType for MCU target

2016-02-03 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/D16626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16761: clang-cl: Support loading plugins on Windows

2016-02-08 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/D16761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r260194 - Avoid forcing emission of delayed dllexported classes on template instantiation

2016-02-08 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Feb 8 20:51:17 2016 New Revision: 260194 URL: http://llvm.org/viewvc/llvm-project?rev=260194&view=rev Log: Avoid forcing emission of delayed dllexported classes on template instantiation Fixes PR26490 Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp cfe/tru

r260241 - Revert "Avoid forcing emission of delayed dllexported classes on template instantiation"

2016-02-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 9 11:48:27 2016 New Revision: 260241 URL: http://llvm.org/viewvc/llvm-project?rev=260241&view=rev Log: Revert "Avoid forcing emission of delayed dllexported classes on template instantiation" This reverts commit r260194. It caused PR26549. There's probably a better wa

r260267 - Pass /bigobj when building lib/ASTMatchers/Dynamic/Registry.cpp

2016-02-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 9 13:53:30 2016 New Revision: 260267 URL: http://llvm.org/viewvc/llvm-project?rev=260267&view=rev Log: Pass /bigobj when building lib/ASTMatchers/Dynamic/Registry.cpp This is the third time it has crossed the 2^16 section limit. We've already spent time optimizing this

Re: r260267 - Pass /bigobj when building lib/ASTMatchers/Dynamic/Registry.cpp

2016-02-09 Thread Reid Kleckner via cfe-commits
On Tue, Feb 9, 2016 at 12:32 PM, Aaron Ballman wrote: > On Tue, Feb 9, 2016 at 2:53 PM, Reid Kleckner via cfe-commits > wrote: > > Author: rnk > > Date: Tue Feb 9 13:53:30 2016 > > New Revision: 260267 > > > > URL: http://llvm.org/viewvc/llvm-project?r

Re: [PATCH] D15373: Fix for bug 25786 - Assertion "Chunk.Kind == DeclaratorChunk::Function" failed with regparm attribute.

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

Re: [PATCH] D13622: Add call to find_package to load LLVM dependencies

2016-02-09 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/D13622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17061: [MS ABI] Never reference dllimport'd vtables

2016-02-09 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm if you clarify that bit Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1676 @@ -1675,2 +1675,3 @@ - llvm::GlobalValue::LinkageTypes VFTableLinkage = CGM.getVTableLinkage(RD); +

r260411 - Silence some MSVC false positive warnings about integer zexts and falling off the end of a covered switch

2016-02-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Feb 10 13:09:15 2016 New Revision: 260411 URL: http://llvm.org/viewvc/llvm-project?rev=260411&view=rev Log: Silence some MSVC false positive warnings about integer zexts and falling off the end of a covered switch Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp

r260435 - [clang-cl] /Z7 now generates normal debug info, not just line info

2016-02-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Feb 10 15:28:38 2016 New Revision: 260435 URL: http://llvm.org/viewvc/llvm-project?rev=260435&view=rev Log: [clang-cl] /Z7 now generates normal debug info, not just line info Previously LLVM could not process any debug info we produced, so it didn't make sense to spend time

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Reid Kleckner via cfe-commits
rnk added a comment. Ultimately, Sema should be responsible for rejecting this, correct? In the meantime we can have CodeGen reject this and emit a null value to avoid crashing. Comment at: lib/CodeGen/CGCUDABuiltin.cpp:105 @@ -99,3 +104,3 @@ llvm::Value *P = Builder.Cr

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGCUDABuiltin.cpp:105 @@ -99,3 +104,3 @@ llvm::Value *P = Builder.CreateStructGEP(AllocaTy, Alloca, I - 1); llvm::Value *Arg = Args[I].RV.getScalarVal(); Builder.CreateAlignedStore(Arg, P, DL.getPrefTypeAlign

r260472 - Fix two tests relying on LLVM -O1 behavior

2016-02-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Feb 10 18:14:04 2016 New Revision: 260472 URL: http://llvm.org/viewvc/llvm-project?rev=260472&view=rev Log: Fix two tests relying on LLVM -O1 behavior Something changed the inference of nonnull. Modified: cfe/trunk/test/CodeGenCXX/init-invariant.cpp cfe/trunk/test/C

Re: [PATCH] D16808: [MCU] PR26438: Fix assertion failure on function returning an empty struct or union

2016-02-10 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/D16808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17103: [CUDA] Don't crash when trying to printf a non-scalar object.

2016-02-10 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/CGCUDABuiltin.cpp:90 @@ +89,3 @@ +CGM.ErrorUnsupported(E, "non-scalar arg to printf"); +return RValue::getIgnored(); + } Doesn

Re: [PATCH] D17214: Stop using "template" when printing qualtype names

2016-02-12 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 This code seems like it's intended to avoid operating on dependent types, so it shouldn't need the template keyword. It's hard to have a

r260993 - [typo-correction] Apply name specifier corrections when forming a NNS

2016-02-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 16 13:16:20 2016 New Revision: 260993 URL: http://llvm.org/viewvc/llvm-project?rev=260993&view=rev Log: [typo-correction] Apply name specifier corrections when forming a NNS Previously we would leave behind the old name specifier prefix, which creates an invalid AST. Ot

r260994 - Exclude PCH/missing-file.cpp on Windows, it does not pass reliably

2016-02-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 16 13:16:28 2016 New Revision: 260994 URL: http://llvm.org/viewvc/llvm-project?rev=260994&view=rev Log: Exclude PCH/missing-file.cpp on Windows, it does not pass reliably Tag the test with "REQUIRES: can-remove-opened-file", which is what we use for the similar test Modu

r261005 - Stop using "template" when printing qualtype names

2016-02-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 16 14:34:27 2016 New Revision: 261005 URL: http://llvm.org/viewvc/llvm-project?rev=261005&view=rev Log: Stop using "template" when printing qualtype names Summary: The keyword "template" isn't necessary when printing a fully-qualified qualtype name, and, in fact, results

Re: [PATCH] D17214: Stop using "template" when printing qualtype names

2016-02-16 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261005: Stop using "template" when printing qualtype names (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D17214?vs=47854&id=48095#toc Repository: rL LLVM http://reviews.llvm.or

Re: [PATCH] D17330: PR26648: "inline" shouldn't be recognized as a C keyword in MSVC 2013 compatibility mode

2016-02-17 Thread Reid Kleckner via cfe-commits
rnk added a comment. Thanks, but I don't think we should do this. There's already a lot of code out there (ffmpeg) that is already using clang its current form and it does stuff like this: #if defined(_MSC_VER) && !defined(__clang__) # define inline __inline // More MSVC compatibility hac

[PATCH] D17348: Add -Wcast-calling-convention to warn when casting away calling conventions

2016-02-17 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: thakis, rtrieu. rnk added a subscriber: cfe-commits. This only warns on casts of the address of a function defined in the current TU. In this case, the fix is likely to be local and the warning useful. Here are some things we could experiment with i

Re: [PATCH] D13622: Add call to find_package to load LLVM dependencies

2016-02-18 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261290: Add call to find_package to load LLVM dependencies (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D13622?vs=37031&id=48431#toc Repository: rL LLVM http://reviews.llvm.or

r261290 - Add call to find_package to load LLVM dependencies

2016-02-18 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Feb 18 18:56:56 2016 New Revision: 261290 URL: http://llvm.org/viewvc/llvm-project?rev=261290&view=rev Log: Add call to find_package to load LLVM dependencies ClangConfig requires LLVMConfig, so add find_package call in ClangConfig so find_package(clang REQUIRED CONFIG) will

Re: [PATCH] D17072: [Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly

2016-02-18 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, thanks. I like the new approach of avoiding the creation of a LateParsedMethodDeclaration if we couldn't get a NamedDecl back. I'll land it soon. http://reviews.llvm.org/D17072

Re: [PATCH] D17072: [Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly

2016-02-18 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261292: [Sema] PR25181 Fix crash when method declaration with throw spec fails to… (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D17072?vs=47923&id=48435#toc Repository: rL LLVM

r261292 - [Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly

2016-02-18 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Feb 18 19:15:08 2016 New Revision: 261292 URL: http://llvm.org/viewvc/llvm-project?rev=261292&view=rev Log: [Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly Fixes crash referenced in PR25181 where dyn_cast is called on a null instanc

Re: [PATCH] D17313: [CUDA] Annotate all calls in CUDA device mode as convergent.

2016-02-18 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/D17313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-02-19 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think we should do this because MSVC doesn't make _Static_assert available to C code. David says that, according to the C standard, assert.h is supposed to `#define static_assert _Static_assert`. MSVC doesn't do that because they provide static_assert directly as a keywor

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

2016-02-19 Thread Reid Kleckner via cfe-commits
An alternative fix would be to interpose MSVC's assert.h in clang's builtin headers with #include_next, and do the define there. I don't like interposing headers if we can avoid it though. ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

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

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

2016-05-10 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a reviewer: rnk. rnk added a comment. lgtm http://reviews.llvm.org/D19275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17348: Add -Wcast-calling-convention to warn when casting away calling conventions

2016-05-10 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 56802. rnk marked 3 inline comments as done. rnk added a comment. - address comments http://reviews.llvm.org/D17348 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCast.cpp test/Sema/callingconv-cast.c Index: test/Sema/callingconv-cast.c =

Re: [PATCH] D17348: Add -Wcast-calling-convention to warn when casting away calling conventions

2016-05-10 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:294 @@ -293,2 +293,3 @@ def SelTypeCast : DiagGroup<"cast-of-sel-type">; +def CastCallingConvention : DiagGroup<"cast-calling-convention">; def FunctionDefInObjCContainer : DiagGroup<"function-def-in-

r269116 - Add -Wcast-calling-convention to warn when casting away calling conventions

2016-05-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 10 16:00:03 2016 New Revision: 269116 URL: http://llvm.org/viewvc/llvm-project?rev=269116&view=rev Log: Add -Wcast-calling-convention to warn when casting away calling conventions Summary: This only warns on casts of the address of a function defined in the current TU. I

<    5   6   7   8   9   10   11   12   13   14   >