r280826 - Add MS __nop intrinsic to intrin.h

2016-09-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Sep 7 11:55:12 2016 New Revision: 280826 URL: http://llvm.org/viewvc/llvm-project?rev=280826&view=rev Log: Add MS __nop intrinsic to intrin.h Summary: There was no definition for __nop function - added inline assembly. Patch by Albert Gutowski! Reviewers: rnk, thakis Sub

Re: [PATCH] D24286: Add MS __nop intrinsic to intrin.h

2016-09-07 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280826: Add MS __nop intrinsic to intrin.h (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D24286?vs=70495&id=70555#toc Repository: rL LLVM https://reviews.llvm.org/D24286 Files

r280836 - [MS] Fix prologue this adjustment when 'this' is passed indirectly

2016-09-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Sep 7 13:21:30 2016 New Revision: 280836 URL: http://llvm.org/viewvc/llvm-project?rev=280836&view=rev Log: [MS] Fix prologue this adjustment when 'this' is passed indirectly Move the logic for doing this from the ABI argument lowering into EmitParmDecl, which runs for all p

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:740 @@ +739,3 @@ +Value *LeftShifted = Builder.CreateShl(Val, Shift); +Value *RightShifted = Builder.CreateLShr(Val, RightShift); +Value *Shifted = Builder.CreateOr(LeftShifted, RightShifted); ---

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Reid Kleckner via cfe-commits
rnk added a comment. You should locally verify that this generates the correct assembly when optimizations are enabled, and if it doesn't, try to make the input look more like llvm/test/CodeGen/X86/rotate.ll Comment at: test/CodeGen/ms-intrinsics-rotations.c:2 @@ +1,3 @@ +// R

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-09-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 Comment at: lib/Sema/SemaChecking.cpp:7841 @@ +7840,3 @@ +if (S.getLangOpts().CPlusPlus11 && +!BitfieldEnumDecl->getIntegerTypeSourceInfo() && +BitfieldEnum

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added a comment. +Richard for ideas on how to navigate the intel intrinsics Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__built

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/AST/ExprConstant.cpp:7024-7050 @@ -7023,1 +7023,29 @@ + case Builtin::BI_rotl8: + case Builtin::BI_rotl16: + case Builtin::BI_rotl: + case Builtin::BI_lrotl: + case Builtin::BI_rotl64: { +APSInt Val, Shift; +if (!EvaluateIn

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added a comment. I was thinking of suggesting to put it under -Wextra, but -Wall is fine too. I still don't think it should be on by default. I think there are a lot of Unix-only projects out there that aren't concerned with MSVC compatibility, and a warning about how things with in the Mic

Re: [PATCH] D24311: Implement MS _rot intrinsics

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

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse") rsmi

Re: [PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

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

r281053 - [codeview] Extend the heuristic for detecting classes imported from DLLs

2016-09-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Sep 9 11:27:04 2016 New Revision: 281053 URL: http://llvm.org/viewvc/llvm-project?rev=281053&view=rev Log: [codeview] Extend the heuristic for detecting classes imported from DLLs If a dynamic class contains a dllimport method, then assume the class may not be constructed i

r281056 - Make -fstandalone-debug and -flimit-debug-info available in clang-cl

2016-09-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Sep 9 11:42:50 2016 New Revision: 281056 URL: http://llvm.org/viewvc/llvm-project?rev=281056&view=rev Log: Make -fstandalone-debug and -flimit-debug-info available in clang-cl Our limited debug info optimizations are breaking down at DLL boundaries, so we're going to evalua

r281057 - [DebugInfo] Ensure complete type is emitted with -fstandalone-debug

2016-09-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Sep 9 12:03:53 2016 New Revision: 281057 URL: http://llvm.org/viewvc/llvm-project?rev=281057&view=rev Log: [DebugInfo] Ensure complete type is emitted with -fstandalone-debug The logic for upgrading a class from a forward decl to a complete type was not checking the debug i

Re: [PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

2016-09-09 Thread Reid Kleckner via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D24378#538430, @efriedma wrote: > This is probably going to lead to someone complaining about clang realigning > the stack on 32-bit Windows; are your sure we're choosing the right alignment > there? I checked, and MSVC emits a call to __alloca

Re: [PATCH] D24469: [clang-cl] Diagnose duplicate uuids.

2016-09-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 Comment at: lib/Parse/ParseDecl.cpp:1456 @@ -1451,1 +1455,3 @@ + TypeAttrTail = AL; + TypeAttrTail->setNext(nullptr); mmm hand rolled singly linked

r281278 - [DebugInfo] Deduplicate debug info limiting logic

2016-09-12 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Sep 12 19:01:23 2016 New Revision: 281278 URL: http://llvm.org/viewvc/llvm-project?rev=281278&view=rev Log: [DebugInfo] Deduplicate debug info limiting logic We should be doing the same checks when a type is completed as we do when a complete type is used during emission. Pr

Re: r281057 - [DebugInfo] Ensure complete type is emitted with -fstandalone-debug

2016-09-12 Thread Reid Kleckner via cfe-commits
On Mon, Sep 12, 2016 at 11:41 AM, David Blaikie wrote: > (idle thought: It'd be good to make the code common between the first time > a type is encountered, and the later callbacks when the type is completed, > required to be complete, vtable is emitted, etc - the inconsistency here (& > it's spr

Re: [PATCH] D24426: DebugInfo: Pass non-zero alignment to DIBuilder only if aligment was forced

2016-09-12 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. Comment at: lib/CodeGen/CGDebugInfo.cpp:608 @@ -608,2 +607,3 @@ uint64_t Size = CGM.getContext().getTypeSize(Ty); + uint64_t Align = 0; IMO this is what we should be doing everywhere, rather than manually checking AlignedAttr:

Re: [PATCH] D23901: Minor cleanup of the class CallStackFrame

2016-09-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 Repository: rL LLVM https://reviews.llvm.org/D23901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-13 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: test/Sema/implicit-intel-builtin-decl.c:4 @@ +3,3 @@ +void f() { + (void)_mm_getcsr(); // expected-warning{{implicitly declaring library function '_mm_getcsr'}} \ + // expected-note{{include the header or explicitly provide a declaration

Re: [PATCH] D24153: Add bunch of _Interlocked builtins

2016-09-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 Sorry, I lost track of this. https://reviews.llvm.org/D24153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-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 after merging the test back. Comment at: test/Sema/implicit-intel-builtin-decl.c:4 @@ +3,3 @@ +void f() { + (void)_mm_getcsr(); // expected-warning{{implicitly declaring libra

r281408 - Fix a FIXME about MSVC 2013 in the diagnostic doc generation code

2016-09-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Sep 13 17:22:56 2016 New Revision: 281408 URL: http://llvm.org/viewvc/llvm-project?rev=281408&view=rev Log: Fix a FIXME about MSVC 2013 in the diagnostic doc generation code Ultimately it boiled down to adding a move constructor. Modified: cfe/trunk/utils/TableGen/Clang

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-13 Thread Reid Kleckner via cfe-commits
rnk added a comment. lgtm We could define a macro that conditionally expands to `extern "C"`, but then we'd have to undef it, and that seems like no good. https://reviews.llvm.org/D24330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

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

r262056 - [dllexport] Sort out emission order of delayed exported classes

2016-02-26 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Feb 26 13:51:02 2016 New Revision: 262056 URL: http://llvm.org/viewvc/llvm-project?rev=262056&view=rev Log: [dllexport] Sort out emission order of delayed exported classes Relands r260194 with a fix. If we have a template that transitions from an extern template to an explic

Re: [PATCH] D16465: [MS ABI] Prevent some expressions from evaluating to a constant

2016-02-26 Thread Reid Kleckner via cfe-commits
rnk added a comment. Richard really is the constexpr owner so I'd like him to chime in if he can. Comment at: include/clang/AST/Decl.h:1092 @@ -1091,3 +1091,3 @@ /// succeeded, 0 otherwise. - APValue *evaluateValue() const; - APValue *evaluateValue(SmallVectorImpl &Notes) c

Re: [PATCH] D17752: [MSVC Compat] Correctly handle finallys nested within finallys

2016-03-01 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGException.cpp:1680-1682 @@ -1679,4 +1679,5 @@ StartFunction(GlobalDecl(), RetTy, Fn, FnInfo, Args, OutlinedStmt->getLocStart(), OutlinedStmt->getLocStart()); + CurCodeDecl = ParentCGF.CurCodeDecl; --

Re: [PATCH] D17752: [MSVC Compat] Correctly handle finallys nested within finallys

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

r262382 - Reword a misleading comment discussing landingpads and SEH

2016-03-01 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Mar 1 13:51:48 2016 New Revision: 262382 URL: http://llvm.org/viewvc/llvm-project?rev=262382&view=rev Log: Reword a misleading comment discussing landingpads and SEH SEH doesn't use landingpads anymore. Modified: cfe/trunk/lib/CodeGen/CGException.cpp Modified: cfe/tru

r262442 - Add a few dllimport/dllexport tests. NFC

2016-03-01 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Mar 1 19:21:48 2016 New Revision: 262442 URL: http://llvm.org/viewvc/llvm-project?rev=262442&view=rev Log: Add a few dllimport/dllexport tests. NFC Summary: This change just adds tests for some corner cases of dllimport/dllexport, primarily for some static methods. We pla

Re: [PATCH] D17775: Add a few dllimport/dllexport tests. NFC

2016-03-01 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262442: Add a few dllimport/dllexport tests. NFC (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D17775?vs=49510&id=49570#toc Repository: rL LLVM http://reviews.llvm.org/D17775

Re: [PATCH] D17799: Serialize `#pragma comment`.

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

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

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

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

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

Re: [PATCH] D15363: [UBSan] Implement runtime suppressions (PR25066).

2016-01-11 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. In http://reviews.llvm.org/D15363#321941, @samsonov wrote: > Interesting. Do we run test/asan/TestCases/suppressions-interceptor.cc on > Windows? Seems so: I don't see an XFAIL there, and it also uses > suppressions, but with single quote, follo

r257383 - Fix -Wmicrosoft-enum-value warning

2016-01-11 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Jan 11 14:55:16 2016 New Revision: 257383 URL: http://llvm.org/viewvc/llvm-project?rev=257383&view=rev Log: Fix -Wmicrosoft-enum-value warning Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h URL: http://llvm.org/viewv

Re: [PATCH] D15686: PR25910: clang allows two var definitions with the same mangled name

2016-01-12 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. I thought we already addressed this issue with @rjmccall and decided that, if the user intentionally declares extern "C" variables with an _Z prefix, then we know they are intentionally attempting to name some C++ global variable. I'd rather jus

Re: [PATCH] D15670: Accept elided commas in macro function arguments for MS compatibility

2016-01-12 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Seems reasonable to me, but we should check with Richard. http://reviews.llvm.org/D15670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

Re: [PATCH] D15384: Don't ask for the size of dependent integral types in template diffing

2016-01-15 Thread Reid Kleckner via cfe-commits
rnk abandoned this revision. rnk added a comment. Thanks! http://reviews.llvm.org/D15384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15363: [UBSan] Implement runtime suppressions (PR25066).

2016-01-21 Thread Reid Kleckner via cfe-commits
On Thu, Jan 21, 2016 at 10:47 AM, Nico Weber wrote: > Oh, ok, let's not depend on lld then. So, we need to either determine if >> DIA SDK is available at compiler-rt configure time, or teach >> llvm-symbolizer.exe to tell us that (as we support standalone compiler-rt >> build)... >> > > Maybe the

Re: [PATCH] D16465: [MS ABI] Prevent some expressions from evaluating to a constant

2016-01-22 Thread Reid Kleckner via cfe-commits
rnk added a comment. Your code won't catch this test case: static int x; extern inline const bool *f() { static const bool p = !&x; return &p; } Getting this exactly right is going to be a challenge. =/ Comment at: include/clang/Basic/DiagnosticASTKinds.td:151 @@

Re: [PATCH] D15670: Accept elided commas in macro function arguments for MS compatibility

2016-01-22 Thread Reid Kleckner via cfe-commits
rnk added a comment. Let's go ahead and land this. It doesn't seem high risk. Richard will be back on Monday, he's been skiing. http://reviews.llvm.org/D15670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

Re: [PATCH] D16511: [MSVC Compat] Only warn for unknown clang-cl arguments

2016-01-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 other than the warning group. Comment at: test/Misc/warning-flags.c:21 @@ -20,3 +20,3 @@ -CHECK: Warnings without flags (84): +CHECK: Warnings without flags (85): CHECK-NEXT

Re: r258720 - [MSVC Compat] Only warn for unknown clang-cl arguments

2016-01-26 Thread Reid Kleckner via cfe-commits
On Tue, Jan 26, 2016 at 4:36 AM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Is this really a good idea? Yes, there are many broken configure > scripts, but at the same point, this change makes it more difficult > to detect whether an option is supported. > Of cours

Re: [PATCH] D16582: fix array index out of bounds

2016-01-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 This code is old and super janky. =/ Repository: rL LLVM http://reviews.llvm.org/D16582 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

Re: [PATCH] D16632: clang-cl: Take dllexport from original function decl into account

2016-01-27 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. Hans knows all about dllexport now. http://reviews.llvm.org/D16632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-01-27 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/AST/ASTConsumer.h:58-64 @@ -57,5 +57,9 @@ /// \brief This callback is invoked each time an inline method definition is /// completed. virtual void HandleInlineMethodDefinition(CXXMethodDecl *D) {} + /// \brief This

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

2016-01-27 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:1108-1110 @@ -1106,1 +1107,5 @@ + case tok::kw___cdecl: // struct foo {...} __cdecl x; // C4229 +if (!getLangOpts().MicrosoftExt) + break; +// fall through // Type qualifiers -

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

2016-01-27 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/AST/ASTConsumer.h:58-64 @@ -57,5 +57,9 @@ /// \brief This callback is invoked each time an inline method definition is /// completed. virtual void HandleInlineMethodDefinition(CXXMethodDecl *D) {} + /// \brief This

Re: [PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

2016-01-28 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGCUDABuiltin.cpp:105-108 @@ -104,2 +104,6 @@ } else { -BufferPtr = Builder.Insert(new llvm::AllocaInst( +// Insert our alloca not into the current BB, but into the function's entry +// block. This is important bec

Re: [PATCH] D16478: Always build a new TypeSourceInfo for function templates with parameters

2016-01-28 Thread Reid Kleckner via cfe-commits
rnk added a comment. The fact that an instantiated type might point to decls from the template pattern seems like expected behavior. The parts of the template that are the same are supposed to be shared. Can we dig in to what is going wrong in parent map construction? http://reviews.llvm.org/

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] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-10 Thread Reid Kleckner via cfe-commits
rnk added a comment. This will definitely work, but it will substantially increase the size of clang-tidy: $ du -cksh bin/clang-tidy.exe bin/clang.exe 21M bin/clang-tidy.exe 47M bin/clang.exe 68M total The difference is mostly from the backends, and that's with only the X86 and ARM

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

2016-03-11 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D17981#372823, @alexfh wrote: > If this issue is specific to MS inline asm, then the additional dependencies > should only be added, when we care about MS inline asm (windows builds only?). Clang is always a cross compiler, we never know what we

Re: [PATCH] D17453: [Driver] Enable --rtlib option for MSVC target

2016-03-11 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/Driver/Tools.cpp:8948 @@ -8947,5 +8947,3 @@ break; - case ToolChain::RLT_Libgcc: -AddLibgcc(TC.getTriple(), D, CmdArgs, Args); -break; - } +c

r263269 - [SEH] Remove nounwind/noinline from outlined finally funclets

2016-03-11 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Mar 11 11:36:16 2016 New Revision: 263269 URL: http://llvm.org/viewvc/llvm-project?rev=263269&view=rev Log: [SEH] Remove nounwind/noinline from outlined finally funclets With the new EH representation this is no longer necessary. Modified: cfe/trunk/lib/CodeGen/CGExcept

r263279 - Allow sizeof(UnrelatedClass::field) in C++11 class template methods

2016-03-11 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Mar 11 12:59:12 2016 New Revision: 263279 URL: http://llvm.org/viewvc/llvm-project?rev=263279&view=rev Log: Allow sizeof(UnrelatedClass::field) in C++11 class template methods This feature works outside of templates by forming a DeclRefExpr to a FieldDecl instead of a Member

r263285 - Add missing triple to instantiate-sizeof.cpp test

2016-03-11 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Mar 11 13:17:53 2016 New Revision: 263285 URL: http://llvm.org/viewvc/llvm-project?rev=263285&view=rev Log: Add missing triple to instantiate-sizeof.cpp test Modified: cfe/trunk/test/SemaTemplate/instantiate-sizeof.cpp Modified: cfe/trunk/test/SemaTemplate/instantiate-s

Re: [PATCH] D15599: [CodeGen] Fix a crash that occurs when attribute "naked" is attached to a c++ member function

2016-03-11 Thread Reid Kleckner via cfe-commits
rnk added a comment. I guess I'm OK with the approach. Comment at: lib/CodeGen/CodeGenFunction.cpp:1967 @@ +1966,3 @@ + +void CodeGenFunction::cleanupNakedFunction() { + llvm::SmallPtrSet InstrsToRemove; This isn't the right approach. Look at Function::dropAllR

Re: [PATCH] D17709: [MSVC Compat] Support for '__unaligned' attribute in function declaration

2016-03-14 Thread Reid Kleckner via cfe-commits
rnk added a comment. Unless there is a compelling example of Microsoft or a popular third-party header relying on this behavior, I don't think we should implement it. Comment at: lib/Parse/ParseDecl.cpp:4813 @@ -4812,1 +4812,3 @@ + if ((AttrReqs & AR_DeclspecAttributesPars

Re: [PATCH] D18071: CodeGen: Mark functions used in vtables as unnamed_addr.

2016-03-14 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. In http://reviews.llvm.org/D18071#373687, @pcc wrote: > Done (this also affects `_purecall` in the MS ABI; I don't think this change > should break anything there, but som

<    2   3   4   5   6   7   8   9   10   11   >