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

2016-05-10 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269116: Add -Wcast-calling-convention to warn when casting away calling conventions (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D17348?vs=56802&id=56814#toc Repository: rL LLV

r269118 - Wildcard away paths in fixit CHECKs in my last testcase

2016-05-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 10 16:10:25 2016 New Revision: 269118 URL: http://llvm.org/viewvc/llvm-project?rev=269118&view=rev Log: Wildcard away paths in fixit CHECKs in my last testcase Oops. :( Modified: cfe/trunk/test/Sema/callingconv-cast.c Modified: cfe/trunk/test/Sema/callingconv-cast.

Re: [PATCH] D20136: Get default -fms-compatibility-version from cl.exe's version

2016-05-10 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Driver/MSVCToolChain.cpp:41 @@ -40,1 +40,3 @@ + + #pragma comment(lib, "version.lib") #endif Personally, I think this is OK but I know Aaron Ballman and other people don't like using pragma comment lib. The alternative

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

2016-05-11 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4813 @@ +4812,3 @@ +// and move constructor, so don't attempt to import/export them if +// we have a definition. +auto *CXXC = dyn_cast(MD); Oh, so we were already doing this c

Re: [PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

2016-05-11 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/LangOptions.def:220 @@ -218,3 +219,3 @@ LANGOPT(MRTD , 1, 0, "-mrtd calling convention") BENIGN_LANGOPT(DelayedTemplateParsing , 1, 0, "delayed template parsing") Let's get rid of this and have it use

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

2016-05-11 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4816 @@ -4815,1 +4815,3 @@ +if ((MD->isMoveAssignmentOperator() || + (CXXC && CXXC->isMoveConstructor())) && !getLangOpts().isCompatibleWithMSVC(LangOptions::MSVC2015)) ---

Re: [PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

2016-05-11 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/AST/ASTContext.cpp:8604-8606 @@ -8603,5 +8603,5 @@ bool IsCXXMethod) const { // Pass through to the C++ ABI object if (IsCXXMethod) return ABI->getDefaultMethodCallConv(IsVar

r269201 - Update clang support on recent Haiku

2016-05-11 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed May 11 11:19:05 2016 New Revision: 269201 URL: http://llvm.org/viewvc/llvm-project?rev=269201&view=rev Log: Update clang support on recent Haiku [ Copied from https://llvm.org/bugs/show_bug.cgi?id=26404 ] clang support on Haiku is lagging a bit, and missing on x86_64. This

Re: [PATCH] D16797: Update clang support on recent Haiku

2016-05-11 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269201: Update clang support on recent Haiku (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D16797?vs=53464&id=56929#toc Repository: rL LLVM http://reviews.llvm.org/D16797 File

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

2016-05-11 Thread Reid Kleckner via cfe-commits
On Tue, May 10, 2016 at 5:55 PM, Hans Wennborg wrote: >> This warning is currently off by default while we study its usefulness. > > Turns out this wasn't true :-) For example, it's firing here: > https://build.chromium.org/p/chromium.fyi/builders/ClangToTWin%28dbg%29/builds/5569/steps/compile/log

r269214 - Relax -Wcalling-convention-cast when casting to the default convention (cdecl)

2016-05-11 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed May 11 12:43:13 2016 New Revision: 269214 URL: http://llvm.org/viewvc/llvm-project?rev=269214&view=rev Log: Relax -Wcalling-convention-cast when casting to the default convention (cdecl) Modified: cfe/trunk/lib/Sema/SemaCast.cpp cfe/trunk/test/Sema/callingconv-cast.c

Re: [PATCH] D20180: [tooling] Fix missing inline keyworkd, breaking build bot.

2016-05-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 I don't see how this could be causing the problem, but it's worth a try. They should be marked inline anyway. http://reviews.llvm.org/D20180 ___

Re: [PATCH] D20180: [tooling] Fix missing inline keyworkd, breaking build bot.

2016-05-11 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D20180#427840, @alexfh wrote: > `inline` seems to be completely redundant here. Can you try removing it and > running whatever build configurations were failing without > http://reviews.llvm.org/D20182? My bad, it's explicit function template sp

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

2016-05-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 I've been trying to say that ABI compatibility is not the same thing as generating the same set of exported symbols, but it really doesn't matter. If MSVC 2013 and 2015 are not ABI compatible

Re: [PATCH] D20261: [compiler-rt] Fix multi-configuration output paths

2016-05-13 Thread Reid Kleckner via cfe-commits
rnk added a comment. Will this put the libraries in build/Release/bin/../lib/. aka build/Release/lib, or will they collide between build types? http://reviews.llvm.org/D20261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

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

2016-05-13 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: test/SemaCXX/dllimport.cpp:179 @@ -140,1 +178,3 @@ +template +int ExternVarTmplDeclInit = 1; avt77 wrote: > majnemer wrote: > > avt77 wrote: > > > rnk wrote: > > > > Can you check with MSVC 2015 update 2 actually does with

Re: [PATCH] D20136: Get default -fms-compatibility-version from cl.exe's version

2016-05-13 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. LG, sounds like people are happy with this http://reviews.llvm.org/D20136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

Re: [PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

2016-05-13 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/Driver/CC1Options.td:615 @@ +614,3 @@ + HelpText<"Set default MS calling convention">; +def mrtd : Flag<["-"], "mrtd">, Group, + Alias, AliasArgs<["stdcall"]>, Doesn't this have to live in Options.td if you wa

Re: [PATCH] D20261: [compiler-rt] Fix multi-configuration output paths

2016-05-13 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Great! Lgtm http://reviews.llvm.org/D20261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

r269780 - Tentatively enable -Wcast-calling-convention by default

2016-05-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 17 11:50:45 2016 New Revision: 269780 URL: http://llvm.org/viewvc/llvm-project?rev=269780&view=rev Log: Tentatively enable -Wcast-calling-convention by default In Chrome, this would have found two true positives around CreateThread if we hadn't already fixed them while r

Re: r269214 - Relax -Wcalling-convention-cast when casting to the default convention (cdecl)

2016-05-17 Thread Reid Kleckner via cfe-commits
Cool, r269780. Let's see if anyone finds any bugs or false positives. On Mon, May 16, 2016 at 4:10 PM, Nico Weber wrote: > After this tweak, Chromium builds cleanly with the new warning enabled. > Maybe it's time to turn it on by default. > > On Wed, May 11, 2016 at 1:43

r269781 - Fix calling convention test

2016-05-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 17 11:54:40 2016 New Revision: 269781 URL: http://llvm.org/viewvc/llvm-project?rev=269781&view=rev Log: Fix calling convention test Modified: cfe/trunk/test/Sema/callingconv-cast.c Modified: cfe/trunk/test/Sema/callingconv-cast.c URL: http://llvm.org/viewvc/llvm-pr

r269787 - Fix line numbers in calling convention test

2016-05-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 17 12:33:31 2016 New Revision: 269787 URL: http://llvm.org/viewvc/llvm-project?rev=269787&view=rev Log: Fix line numbers in calling convention test Modified: cfe/trunk/test/Sema/callingconv-cast.c Modified: cfe/trunk/test/Sema/callingconv-cast.c URL: http://llvm.or

Re: [PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

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

Re: [PATCH] D20422: [MSVC2015] dllexport for defaulted special class members

2016-05-19 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4814 @@ -4813,3 +4813,3 @@ // we have a definition. auto *CXXC = dyn_cast(MD); if ((MD->isMoveAssignmentOperator() || nit, can you rename this Ctor? I definitely know that t

Re: [PATCH] D20392: [CodeView] Modify emitTypeInformation to use MemoryTypeTableBuilder

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

r270164 - Avoid depending on test inputes that aren't in Inputs

2016-05-19 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu May 19 19:38:25 2016 New Revision: 270164 URL: http://llvm.org/viewvc/llvm-project?rev=270164&view=rev Log: Avoid depending on test inputes that aren't in Inputs Some people have weird CI systems that run each test subdirectory independently without access to other parallel

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

2016-05-20 Thread Reid Kleckner via cfe-commits
rnk added a comment. You've described the core issue with parsing C++ templates prior to instantiation, you have to know what identifiers are types, and that's why we need typename. :) MSVC only parses templates after instantiation, so it doesn't need typename. To deal with the specific case i

Re: [PATCH] D20422: [MSVC2015] dllexport for defaulted special class members

2016-05-20 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:13111 @@ -13090,3 +13110,3 @@ llvm_unreachable("Invalid special member."); } } else { DmitryPolukhin wrote: > rnk wrote: > > Can we add `if (InClassDef) ActOnFinishInlineFunctionDef(MD)

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

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

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

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

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

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

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

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

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

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

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

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

Re: [PATCH] Windows support for ObjC DLLIMPORT

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

r265362 - Fix test failure from r265361

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

r265963 - Update getting started docs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

r267186 - Fix a bug involving deferred decl emission and PCH

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-20 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: avt77, rsmith. rnk added a subscriber: cfe-commits. In dependent contexts where we know a type name is required, such as a new expression, we can recover by forming a DependentNameType. Works towards parsing atlctrlw.h, which is PR26748. http://rev

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

2016-05-20 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D19479#435620, @rnk wrote: > To deal with the specific case in ATL, we can use the 'new' expression as a > hint that the unknown identifier is actually a dependent type. There should > be some bit of context we can look at in DiagnoseUnknownTypeNa

Re: [PATCH] D20422: [MSVC2015] dllexport for defaulted special class members

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

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

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

Re: [PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-23 Thread Reid Kleckner via cfe-commits
rnk marked an inline comment as done. Comment at: lib/Parse/ParseDecl.cpp:2282 @@ -2281,3 +2281,3 @@ // Otherwise, if we don't consume this token, we are going to emit an // error anyway. Try to recover from various common problems. Check rsmith wrote: >

Re: [PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-23 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 58119. rnk added a comment. - Recover in ParseImplicitInt instead http://reviews.llvm.org/D20500 Files: include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp lib/Sema/SemaDecl.cpp test/SemaTemplate/ms-delayed-default-template-args.cpp test/SemaTemplate/ms

Re: [PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-23 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 58169. rnk marked an inline comment as done. rnk added a comment. - Share the MSVC compatibility hack between the inside a method case and the default type template argument case http://reviews.llvm.org/D20500 Files: include/clang/Sema/Sema.h lib/Parse/Par

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

2016-05-24 Thread Reid Kleckner via cfe-commits
rnk added a comment. lgtm http://reviews.llvm.org/D18953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-24 Thread Reid Kleckner via cfe-commits
rnk marked 4 inline comments as done. Comment at: lib/Sema/SemaDecl.cpp:559-562 @@ -521,6 +558,6 @@ } } return DeclSpec::TST_unspecified; } rsmith wrote: > Doesn't seem to be done? I can easily believe there's a good reason why we > want two d

Re: [PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-24 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 58315. rnk added a comment. Herald added a subscriber: jyknight. - nits http://reviews.llvm.org/D20500 Files: include/clang-c/Index.h include/clang/AST/RecordLayout.h include/clang/Basic/BuiltinsX86.def include/clang/Driver/CLCompatOptions.td include/

Re: [PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-24 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 58316. rnk added a comment. - fix the diff http://reviews.llvm.org/D20500 Files: include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp lib/Sema/SemaDecl.cpp test/SemaTemplate/ms-delayed-default-template-args.cpp test/SemaTemplate/ms-lookup-template-base-c

r270615 - [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-24 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 24 16:23:54 2016 New Revision: 270615 URL: http://llvm.org/viewvc/llvm-project?rev=270615&view=rev Log: [ms] Allow more unqualified lookup of types in dependent base classes Summary: In dependent contexts where we know a type name is required, such as a new expression, w

Re: [PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

2016-05-24 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270615: [ms] Allow more unqualified lookup of types in dependent base classes (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D20500?vs=58316&id=58319#toc Repository: rL LLVM htt

Re: [PATCH] D20683: [MSVC2015] Fix mangling for static variables initialization guards

2016-05-26 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a reviewer: rnk. rnk added a comment. This revision is now accepted and ready to land. lgtm, agreed, looks like an oversight. http://reviews.llvm.org/D20683 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

Re: [PATCH] Fix stack overflow in MSVC unqualified type lookup logic

2016-05-31 Thread Reid Kleckner via cfe-commits
Thanks for the patch and report! Can this check be defeated with mutually recursive class template inheritance? I was thinking something like this: ... template struct FooWrapper : FooTemplated { }; // Full template spec template class FooTemplated : public FooWrapper { ... Maybe we should us

r271305 - Work around MinGW's macro definition of 'interface' to 'struct'

2016-05-31 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 31 12:42:56 2016 New Revision: 271305 URL: http://llvm.org/viewvc/llvm-project?rev=271305&view=rev Log: Work around MinGW's macro definition of 'interface' to 'struct' Previous attempts to rename the IBOutletCollection argument to something other than "Interface" were un

Re: [PATCH] D20757: Add "REQUIRES-ANY" feature test

2016-05-31 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/D20757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D21141: [DebugInfo] Add calling conventions to DISubroutineType

2016-06-08 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: aprantl, dblaikie. rnk added a subscriber: cfe-commits. rnk added a dependency: D21114: [DebugInfo] Add calling convention support for DWARF and CodeView. This should have been a very simple change, but it was greatly complicated by the construction

Re: [PATCH] D21141: [DebugInfo] Add calling conventions to DISubroutineType

2016-06-08 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D21141#452517, @aprantl wrote: > Assuming that we could usually get the calling convention from the Function — > what's the motivation for emitting the calling convention of a subprogram > that has been optimized away? I don't have any motivatio

r272198 - [DebugInfo] Add calling conventions to DISubroutineType

2016-06-08 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jun 8 15:41:54 2016 New Revision: 272198 URL: http://llvm.org/viewvc/llvm-project?rev=272198&view=rev Log: [DebugInfo] Add calling conventions to DISubroutineType Summary: This should have been a very simple change, but it was greatly complicated by the construction of new

Re: [PATCH] D21141: [DebugInfo] Add calling conventions to DISubroutineType

2016-06-08 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272198: [DebugInfo] Add calling conventions to DISubroutineType (authored by rnk). Changed prior to commit: http://reviews.llvm.org/D21141?vs=60055&id=60101#toc Repository: rL LLVM http://reviews.ll

Re: r272253 - clang/test/CodeGenCXX/debug-info-method.cpp: Tweak for thiscall, for targeting Win32 x86.

2016-06-15 Thread Reid Kleckner via cfe-commits
On Thu, Jun 9, 2016 at 8:59 AM, David Blaikie wrote: > Reid - is this intended fallout? (seems plausible, but just checking) > > Is MinGW a good analogy for any of this work? (does it produce DWARF? Does > it use the Windows ABI? Does it emit Calling Convention attributes?) > It is intended fall

Re: r272253 - clang/test/CodeGenCXX/debug-info-method.cpp: Tweak for thiscall, for targeting Win32 x86.

2016-06-15 Thread Reid Kleckner via cfe-commits
On Wed, Jun 15, 2016 at 11:05 AM, David Blaikie wrote: > Perhaps we shouldn't emit it if it's the logical platform default as it > (to my naive understanding) appears to be here? > It is only the default for member functions, and member functions can be cdecl (the free function default). I think

Re: [PATCH] D20347: Add support to clang-cl driver for /GS switch

2016-06-15 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a reviewer: rnk. rnk added a comment. lgtm Surely this is going to break something, but let's throw the switch and find out. http://reviews.llvm.org/D20347 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

Re: [PATCH] clang: ignore -maccumulate_outgoing_args option

2016-06-15 Thread Reid Kleckner via cfe-commits
Actually, in the last three months we've recently added support for pushing arguments in a call sequence. I think we should wire this up to an LLVM function attribute. It should be a tiny bit of work in llvm/lib/Target/X86/X86FrameLowering.cpp and clang/lib/CodeGen/CodeGenModule.cpp:SetLLVMFunction

r272862 - [DebugInfo] Enable generation of unique identifiers for externally visible MS ABI types

2016-06-15 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jun 15 20:21:28 2016 New Revision: 272862 URL: http://llvm.org/viewvc/llvm-project?rev=272862&view=rev Log: [DebugInfo] Enable generation of unique identifiers for externally visible MS ABI types We implemented the mangling for this a long time ago. Added: cfe/trunk/te

r272944 - [DebugInfo] Put the vftable index in the debug info

2016-06-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Jun 16 15:08:51 2016 New Revision: 272944 URL: http://llvm.org/viewvc/llvm-project?rev=272944&view=rev Log: [DebugInfo] Put the vftable index in the debug info This won't always be enough info to call a virtual method from the debugger, but it's a start. Modified: cfe/t

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-16 Thread Reid Kleckner via cfe-commits
rnk added a comment. Can't we implement /Ob1 by applying noinline to every non-inline specified function with weak linkage? http://reviews.llvm.org/D20647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-17 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D20647#460520, @Ilod wrote: > I don't think weak linkage defines this. Right, sorry, normal external linkage is the obvious case. I was hung up thinking about cases like this: volatile int x; template struct A { void f(); void g()

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