[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Oops, meant to actually include the testcase in my last comment: struct V1 { }; struct V2 : virtual V1 { }; struct A { virtual V1 *f(int,...); }; struct B : A { virtual void b(); virtual V2 *f(int,...); }; B b; Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > In the MS ABI, deriving a new class may require the creation of new thunks > for methods that were not overridden, so we can't use the same trick. Yes. MSVC emits an error message "covariant returns with multiple or virtual inheritance not supported for varargs func

[PATCH] D67140: [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D67140#1659774 , @aaron.ballman wrote: > I don't think it's a requirement (so long as the diagnostics are clear about > the issue being diagnosed, I'm happy enough), but I think it's good for a > tool to be self-consistent in its

[PATCH] D66365: [clang-tidy] [readability-convert-member-functions-to-static] ignore functions that hide base class methods

2019-09-05 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre abandoned this revision. mgehre added a comment. The discussions on the bug did not provide further insight (until now). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66365/new/ https://reviews.llvm.org/D66365

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Is there a plan to turn this on by default at some point, or will users always have to opt-in to using exceptions? Also, would it make sense to automatically turn this feature on if the user instead supplies `-mexception-handling` to turn on the target feature? Reposi

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think what I said applies to your test case. Basically, in the Itanium C++ ABI, virtual method definitions provide all their thunks as `weak_odr`. We only emit thunks referenced by vtables as an optimization, and they are marked `available_externally`. In your test case,

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I don't really see why we can't just have the existing `-mexception-handling` take on this new meaning? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67208/new/ https://reviews.llvm.org/D67208 ___

[PATCH] D67140: [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D67140#1659831 , @NoQ wrote: > In D67140#1659774 , @aaron.ballman > wrote: > > > I don't think it's a requirement (so long as the diagnostics are clear > > about the issue being d

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Is there some reason why clang can't pass the -exception-model=wasm flag programatically to llc when -mmexception-handling is set? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67208/new/ https://reviews.llvm.org/D67208

[PATCH] D67140: [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I don't have strong feelings on capitalization itself either, but the idea of longer, multi-sentence bug report messages (maybe this could finally be used? D66572#inline-602143 ) sound pretty cool. Repository: rG LLVM

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > In your test case, we hit the early return that I linked to, so we don't try > to clone, and we don't need to emit an error. Yes, that's what happens with the Itanium ABI; what happens with the MS ABI? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-05 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. > Still think this looks good. Have you tried running this on the llvm test > suite, or some other interesting corpus? Would be curious to see any pre/post > patch numbers. I finally had time this morning to patch this in and give it a shot. (Sorry for the delay... i

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D67122#1659882 , @rupprecht wrote: > > Still think this looks good. Have you tried running this on the llvm test > > suite, or some other interesting corpus? Would be curious to see any > > pre/post patch numbers. > > I fin

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 218992. rnk added a comment. - merge into thunks.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67028/new/ https://reviews.llvm.org/D67028 Files: clang/lib/CodeGen/CGVTables.cpp clang/test/CodeGenCXX/lineta

[PATCH] D67140: [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D67140#1659872 , @aaron.ballman wrote: > If we're okay with the inconsistency but still feel like giving ourselves > more work, adding proper punctuation to Static Analyzer diagnostics would at > least make them grammatically cor

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. @tlively @sbc100 What I wanted was to make `-fwasm-exceptions` as something like `-pthreads`, which serves as the only flag that needs to be turned on and turns on all other necessary flags, such as `+matomics`, `+mbulk-memory`, and `--shared-memory`. I think all those

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D67028#1659881 , @efriedma wrote: > > In your test case, we hit the early return that I linked to, so we don't > > try to clone, and we don't need to emit an error. > > Yes, that's what happens with the Itanium ABI; what happens wi

[PATCH] D65371: do not emit -Wunused-macros warnings in -frewrite-includes mode (PR15614)

2019-09-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. A test case would be good (in the clang/test directory - probably near/in the other tests for -frewrite-includes) And does the same bug occur for other preprocessor-related warnings? Maybe it's not practical to disable them all this way & there should be a different s

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 218995. rnk added a comment. - emit an error if we try to clone without a definition Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67028/new/ https://reviews.llvm.org/D67028 Files: clang/lib/CodeGen/CGVTables.cp

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. But why not make -mexception-handling be the option that enabled everything? I mean -mexception-handling is a flag we have today.. if you add -fwasm-exceptions what does -mexception-handling meaning? Is it still useful? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. If this is to be like `-fdwarf-exceptions` I assume the idea is that eventually it will default on when targeting wasm, and become one of those flags that most users never set. In that case it really just selects the default exception model, and thus it should be compat

[PATCH] D67140: [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D67140#1659907 , @NoQ wrote: > In D67140#1659872 , @aaron.ballman > wrote: > > > If we're okay with the inconsistency but still feel like giving ourselves > > more work, adding proper

[PATCH] D67140: [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-05 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. We should take a page from desktop software here. If the messages were in a separate file, there would be a lot of people capable of mass-editing them. When messages are hardcoded in the tool code, navigating and editing them requires more skill, and definitely a lot

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1659941 , @sbc100 wrote: > But why not make -mexception-handling be the option that enabled everything? > I mean -mexception-handling is a flag we have today.. if you add > -fwasm-exceptions what does -mexception-han

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1659972 , @dschuff wrote: > If this is to be like `-fdwarf-exceptions` I assume the idea is that > eventually it will default on when targeting wasm, and become one of those > flags that most users never set. In that ca

[PATCH] D66360: Expose constructing a virtual method dispatch through the include/clang/CodeGen APIs.

2019-09-05 Thread Parker Schuh via Phabricator via cfe-commits
pschuh added a comment. Hi John, maybe take a look? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66360/new/ https://reviews.llvm.org/D66360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D67200: Add -static-openmp driver option

2019-09-05 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 219004. pirama added a comment. Change parameter name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67200/new/ https://reviews.llvm.org/D67200 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Derek, are you saying that `-mexception-handling` is somehow related to `-fno-exceptions`. What is the relationship?I wasn't aware this change was related to `-fno-exceptions`. `-pthreads` enabling `-matomics` and `-mbulk-memory`make some sense because each of t

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Oh, you're right, I'm conflating `-mexception-handling` with `-fexceptions`. And also `-fno-exceptions` with `noexcept`. So... just forget I was here Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D67246: clang-format: Add support for formatting lambdas with explicit template parameters.

2019-09-05 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: krasimir. Ports r359967 to clang-format. https://reviews.llvm.org/D67246 Files: clang/lib/Format/TokenAnnotator.cpp clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTest.cpp Index: clang/unittests/Format/FormatT

[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header

2019-09-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 219008. ahatanak added a comment. Rename function to `ignoreForTrivialityComputation`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65256/new/ https://reviews.llvm.org/D65256 Files: include/clang/AST/ASTContext.h lib/A

[PATCH] D66572: [analyzer] NFC: BugReporter Separation Ep.I.

2019-09-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:122 + /// Get the location on which the report should be uniqued. + virtual PathDiagnosticLocation getUniqueingLocation() const { +return Location; gri

[PATCH] D67247: Added missing unqualified name lookup of operator overloads for fold expressions

2019-09-05 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier created this revision. jonathanmeier added reviewers: clang, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Valid operator overloads for fold expressions are not found in the current scope, since unqualified name lookup is not performed. This is a pr

[PATCH] D67024: [analyzer] NFC: Replace intrusive list of bug reports with a vector of pointers.

2019-09-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 219011. NoQ added a comment. Fxd, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67024/new/ https://reviews.llvm.org/D67024 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h clang/lib/StaticAnalyzer/Core/BugReporter.cp

Re: r371004 - [c++20] Fix some ambiguities in our mangling of lambdas with explicit

2019-09-05 Thread Nico Weber via cfe-commits
On Wed, Sep 4, 2019 at 9:22 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Wed Sep 4 18:23:47 2019 > New Revision: 371004 > > URL: http://llvm.org/viewvc/llvm-project?rev=371004&view=rev > Log: > [c++20] Fix some ambiguities in our mangling of lambd

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: dexonsmith, arphaman, rsmith, aprantl. Herald added subscribers: cfe-commits, jkorous. Herald added a project: clang. When files often get touched during builds, the mtime based validation leads to different problems in implicit modules builds, e

[PATCH] D65761: Add Windows Control Flow Guard checks (/guard:cf).

2019-09-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: hans. rnk added a comment. Here is some feedback, I apologize for dragging my feet. Also, I would really like to get feedback from @pcc. He's OOO currently, though. Comment at: clang/include/clang/Driver/Options.td:500 def b : JoinedOrSeparate<["-"], "

[PATCH] D67200: Add -static-openmp driver option

2019-09-05 Thread Stephen Hines via Phabricator via cfe-commits
srhines accepted this revision. srhines added a comment. This revision is now accepted and ready to land. Looks really nice. I am sure the NDK developers will be happy to see support for static OpenMP. Do you want to add the public NDK github issue link in the commit message? Repository: rG

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1660041 , @sbc100 wrote: > `-pthreads` enabling `-matomics` and `-mbulk-memory`make some sense > because each of those low level flags might make sense on its own. But if > `-fwasm-exceptions` only going to enable

[PATCH] D67200: Add -static-openmp driver option

2019-09-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Instead of more `-static-foobar`, maybe we need `-static=foobar,stdlib,rtlib` instead? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67200/new/ https://reviews.llvm.org/D67200 ___

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-05 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Nice! Are you planning to address the FIXME's in a later update of this patch? Comment at: clang/lib/Serialization/ASTWriter.cpp:1767 bool IsTopLevelModuleMap; + uint32_t ContentHash[2]; }; Why is this not a uint64_t? ===

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1660041 , @sbc100 wrote: > `-pthreads` enabling `-matomics` and `-mbulk-memory`make some sense > because each of those low level flags might make sense on its own. But if > `-fwasm-exceptions` only going to enable

[PATCH] D67058: [clang][CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

2019-09-05 Thread Sr.Zhang via Phabricator via cfe-commits
zsrkmyn added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3002 false); llvm::Constant *Resolver = GetOrCreateLLVMFunction( MangledName + ".resolver", ResolverType, GlobalDecl{}, erichkeane wrote: > This Resolver should

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-05 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth created this revision. paulkirth added reviewers: phosek, leonardchan, nickdesaulniers. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, mgorny. Herald added projects: clang, LLVM. This is a continuation of the work in D66324 that creates

[PATCH] D67058: [clang][CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

2019-09-05 Thread Sr.Zhang via Phabricator via cfe-commits
zsrkmyn marked an inline comment as done. zsrkmyn added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3005 /*ForVTable=*/false); +auto Linkage = (FD->isCPUDispatchMultiVersion() || FD->isCPUSpecificMultiVersion()) +? llvm::Function::LinkOn

[PATCH] D53238: [Driver] Add -static= to unify -static-{libgcc,libstdc++}

2019-09-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 219025. MaskRay retitled this revision from "[Driver] Add -static-{rtlib,stdlib} and make -static-{libgcc,libstdc++} their aliases" to "[Driver] Add -static= to unify -static-{libgcc,libstdc++}". MaskRay edited the summary of this revision. MaskRay added revi

[PATCH] D53238: [Driver] Add -static= to unify -static-{libgcc,libstdc++}

2019-09-05 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. Does this regress from existing behavior for unused arguments? Currently, `-static-libstdc++ -nostdlib` issues an unused argument warning for `-static-libstdc++`, while AFAICT `-static=c++stdlib -nostdlib` doesn't. I'm not exactly sure how/where to issue this warning, t

[PATCH] D58094: Fix -Wnonportable-include-path suppression for header maps with absolute paths.

2019-09-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:888 bool InUserSpecifiedSystemFramework = false; -bool HasBeenMapped = false; +bool CurrentInHeaderMap = false; bool IsFrameworkFoundInDir = false; Why not name this th

[PATCH] D53238: [Driver] Add -static= to unify -static-{libgcc,libstdc++}

2019-09-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D53238#1660259 , @pirama wrote: > Does this regress from existing behavior for unused argument warnings? > Currently, `-static-libstdc++ -nostdlib` issues an unused argument warning > for `-static-libstdc++`, while AFAICT `-s

r371169 - [X86] Prevent passing vectors of __int128 as in llvm IR

2019-09-05 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu Sep 5 23:02:13 2019 New Revision: 371169 URL: http://llvm.org/viewvc/llvm-project?rev=371169&view=rev Log: [X86] Prevent passing vectors of __int128 as in llvm IR As far as I can tell, gcc passes 256/512 bit vectors __int128 in memory. And passes a vector of 1 _int128

r371168 - [X86] Pre-commit vector of __int128 test cases for D64672.

2019-09-05 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu Sep 5 23:02:06 2019 New Revision: 371168 URL: http://llvm.org/viewvc/llvm-project?rev=371168&view=rev Log: [X86] Pre-commit vector of __int128 test cases for D64672. Added: cfe/trunk/test/CodeGen/x86-vec-i128.c Added: cfe/trunk/test/CodeGen/x86-vec-i128.c URL: htt

<    1   2