r273008 - [codeview] Stop emitting fully qualified subprogram display names

2016-06-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Jun 17 11:11:20 2016 New Revision: 273008 URL: http://llvm.org/viewvc/llvm-project?rev=273008&view=rev Log: [codeview] Stop emitting fully qualified subprogram display names This effectively reverts r255744, and leaves the printing option tweaks. We can add the name qualifi

r273063 - [MS] Put member pointer representation flags in our debug info

2016-06-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Jun 17 17:27:59 2016 New Revision: 273063 URL: http://llvm.org/viewvc/llvm-project?rev=273063&view=rev Log: [MS] Put member pointer representation flags in our debug info Added: cfe/trunk/test/CodeGenCXX/debug-info-ms-ptr-to-member.cpp Modified: cfe/trunk/lib/CodeGen

[PATCH] D21544: [MS] Don't expect vftables to be provided for extern template instantiations

2016-06-20 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added a reviewer: majnemer. rnk added a subscriber: cfe-commits. MSVC doesn't provide them. PR28223 I left behind the machinery in case we want to resurrect available_externally vftable emission to support devirtualization. http://reviews.llvm.org/D21544 Files:

Re: [PATCH] D20647: Add support for /Ob1 and -finline-hint-functions flags

2016-06-21 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Another consequence of doing it this way is that the /Ob1 decision will survive through LTO, for better or worse. In http://reviews.llvm.org/D20647#461135, @probinson wrote: > I'm still bemus

r273296 - [MS] Don't expect vftables to be provided for extern template instantiations

2016-06-21 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Jun 21 13:39:55 2016 New Revision: 273296 URL: http://llvm.org/viewvc/llvm-project?rev=273296&view=rev Log: [MS] Don't expect vftables to be provided for extern template instantiations MSVC doesn't provide them. PR28223 I left behind the machinery in case we want to resurre

Re: [PATCH] D21544: [MS] Don't expect vftables to be provided for extern template instantiations

2016-06-21 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL273296: [MS] Don't expect vftables to be provided for extern template instantiations (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D21544?vs=61331&id=61414#toc Repository: rL LL

r273305 - Revert "[MS] Don't expect vftables to be provided for extern template instantiations"

2016-06-21 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Jun 21 14:51:52 2016 New Revision: 273305 URL: http://llvm.org/viewvc/llvm-project?rev=273305&view=rev Log: Revert "[MS] Don't expect vftables to be provided for extern template instantiations" This reverts commit r273296, it broke the Windows self-host. Modified: cfe/

r273454 - [codeview] Set the new IntroducedVirtual debug info flag

2016-06-22 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jun 22 13:34:45 2016 New Revision: 273454 URL: http://llvm.org/viewvc/llvm-project?rev=273454&view=rev Log: [codeview] Set the new IntroducedVirtual debug info flag Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp Modif

Re: [PATCH] D21643: Default to using the Unicode version of Win32 APIs

2016-06-23 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Sure, this serves as a reminder that you should always convert from UTF-8 to wide in Windows support code. I still think we should always explicitly call the wide variants, and it seems like you agr

Re: [PATCH] D21643: Default to using the Unicode version of Win32 APIs

2016-06-23 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D21643#465584, @aaron.ballman wrote: > I have never successfully built compiler-rt with MSVC. Every time I've tried > (the last time was 6+ months ago, so I will try again), the MSVC solution > generated by CMake refuses to compile. From what I un

Re: [PATCH] D21666: [Tooling] Add optional argument to getFullyQualifiedName to prepend "::".

2016-06-24 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/AST/NestedNameSpecifier.cpp:50 @@ +49,3 @@ + + NestedNameSpecifier *P = const_cast(Specifier); + while (P->getPrefix() != nullptr) { Doesn't this mutate the AST in place? We shouldn't be doing that. Co

Re: [PATCH] D21783: [CodeView] Implement support for bitfields in Clang

2016-06-29 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm Cute, preserves debug info compatibility at the cost of some complexity. http://reviews.llvm.org/D21783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

Re: [PATCH] D21700: [SemaExpr] Support lax conversions in assignments with vector and scalars with same size

2016-06-29 Thread Reid Kleckner via cfe-commits
rnk added a comment. After writing r266366, we discovered that GCC accepts none of the code in that test case, so we should consider turning -flax-vector-conversions off by default. Comment at: test/Sema/vector-cast.c:65 @@ -59,1 +64,3 @@ + d = f2; + d = d + f2; } -

Re: [PATCH] D21666: [Tooling] Add optional argument to getFullyQualifiedName to prepend "::".

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

r274147 - Re-land "[MS] Don't expect vftables to be provided for extern template instantiations"

2016-06-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jun 29 13:29:21 2016 New Revision: 274147 URL: http://llvm.org/viewvc/llvm-project?rev=274147&view=rev Log: Re-land "[MS] Don't expect vftables to be provided for extern template instantiations" Reverts r273305 and re-instates r273296. We needed to fix a bug in Sema::MarkV

Re: [PATCH] D21705: Include debug info for nested structs and classes

2016-06-29 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:1075 @@ +1074,3 @@ + } else if (const auto *nestedRec = dyn_cast(I)) { +if (!nestedRec->isImplicit()) + CollectRecordNestedRecord(nestedRec, elements); I would add `&& nestedR

Re: [PATCH] D21705: Include debug info for nested structs and classes

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

Re: [PATCH] D21337: [CUDA] Give templated device functions internal linkage, templated kernels external linkage.

2016-06-30 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Doing this in CodeGen seems right. http://reviews.llvm.org/D21337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

r274245 - Port some more debug info tests on Windows

2016-06-30 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Jun 30 12:41:27 2016 New Revision: 274245 URL: http://llvm.org/viewvc/llvm-project?rev=274245&view=rev Log: Port some more debug info tests on Windows Modified: cfe/trunk/test/CodeGenCXX/debug-info-line.cpp cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp cfe/t

r274246 - [codeview] Emit qualified display names if -gline-tables-only is on

2016-06-30 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Jun 30 12:41:31 2016 New Revision: 274246 URL: http://llvm.org/viewvc/llvm-project?rev=274246&view=rev Log: [codeview] Emit qualified display names if -gline-tables-only is on When -gmlt is on, we don't emit namespace or class scope information, and the CodeView emission cod

Re: r274246 - [codeview] Emit qualified display names if -gline-tables-only is on

2016-06-30 Thread Reid Kleckner via cfe-commits
that bad. Reid On Thu, Jun 30, 2016 at 10:41 AM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Thu Jun 30 12:41:31 2016 > New Revision: 274246 > > URL: http://llvm.org/viewvc/llvm-project?rev=274246&view=rev > Log: > [co

r274326 - [DebugInfo] Set DISubprogram ThisAdjustment in the MS ABI

2016-06-30 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Jun 30 21:41:25 2016 New Revision: 274326 URL: http://llvm.org/viewvc/llvm-project?rev=274326&view=rev Log: [DebugInfo] Set DISubprogram ThisAdjustment in the MS ABI Modified: cfe/trunk/lib/CodeGen/CGCXXABI.h cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/lib/Co

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

2016-07-06 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D22034#474889, @majnemer wrote: > Hmm, I'm not so sure this will work with constexpr: > ... Hah, my version of MSVC fails to install the vtable into 's', and crashes on the call to x.fn(). http://reviews.llvm.org/D22034

Re: [PATCH] D21700: [SemaExpr] Support lax conversions in assignments with vector and scalars with same size

2016-07-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 Seems OK for now. :) http://reviews.llvm.org/D21700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

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

2016-07-06 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D22034#475540, @DmitryPolukhin wrote: > Here is B::foo is not exported but required to build vftable for D. Also user > may want to explicitly control what should be exported from his library and > may decide to remove some functions from exported

Re: [PATCH] D20352: Add XRay flags to Clang

2016-07-07 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 from a driver perspective. Aaron, you're happy with the attribute spelling stuff, right? It looks like you can actually land this before landing the two dependent changes you mention and

Re: [PATCH] D20352: Add XRay flags to Clang

2016-07-07 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D20352#477084, @aaron.ballman wrote: > No, I'm not. I am worried about how this conflicts with another in-flight > patch for supporting MS hotpatchable functions since it seems these two > attributes do roughly the same thing. I'd like to understa

Re: r274246 - [codeview] Emit qualified display names if -gline-tables-only is on

2016-07-07 Thread Reid Kleckner via cfe-commits
On Thu, Jul 7, 2016 at 3:45 PM, David Blaikie wrote: > Yeah - is this necessary for CodeView? (does something break, or do you > just get simple names where you'd prefer full mangled or qualified names) > > It was chosen pretty deliberately to do it this way (use unqualified > names) for gmlt to

Re: r274246 - [codeview] Emit qualified display names if -gline-tables-only is on

2016-07-11 Thread Reid Kleckner via cfe-commits
On Mon, Jul 11, 2016 at 10:35 AM, David Blaikie wrote: > > I believe so, but don't have specific numbers. Alexey made this choice > when it was originally implemented & I believe had the data back then. > I don't think we made an explicit choice to use short names. gdb and addr2line just give you

Re: [PATCH] D22273: Treat enumerator_too_large as an extension in MS ABI mode

2016-07-12 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think this is just a consequence of https://llvm.org/bugs/show_bug.cgi?id=27098 We should just fix the underlying bug so that `EnumDecl::isFixed()` doesn't return true for plain enums in C or C++ when targeting Windows. http://reviews.llvm.org/D22273

Re: [PATCH] D21912: [CUDA] Don't assume that destructors can't be overloaded.

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

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

2016-07-13 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/AST/ExprConstant.cpp:5766 @@ +5765,3 @@ +if (CXXRecordDecl *CD = dyn_cast( +E->getType()->castAs()->getDecl())) + CD->setNeedLocalVFTable(); Even better: if (auto *CD = E->getType()->getAsCXXRecordD

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Reid Kleckner via cfe-commits
Why did we upgrade the unaligned reference binding from a warning to an error? That will make it hard to roll this change out across many codebases. On Thu, Jul 14, 2016 at 7:10 AM, Roger Ferrer Ibanez via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rogfer01 > Date: Thu Jul 14 09:1

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Reid Kleckner via cfe-commits
iation of function template specialization 'std::make_pair' requested here event_queue_.insert(std::make_pair(time_in_usec, ee)); On Thu, Jul 14, 2016 at 4:54 PM, Richard Smith wrote: > On Thu, Jul 14, 2016 at 3:52 PM, Reid Kleckner via cfe-commits < > cfe-commits@lists.llv

Re: r275653 - Reimplement ExternalSemaSource delegation in terms of

2016-07-17 Thread Reid Kleckner via cfe-commits
Breaks the VS 2013 build, even though we tried to check ahead of time: https://llvm.org/bugs/show_bug.cgi?id=28589 http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9110 On Fri, Jul 15, 2016 at 5:35 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author:

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

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

<    7   8   9   10   11   12   13   14   15   16   >