[PATCH] D58757: Add a version of the pass_object_size attribute that works with builtin_dynamic_object_size

2019-03-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58757/new/ https://reviews.llvm.org/D58757 ___ cfe-commits mailing lis

[PATCH] D59394: [Sema] De-duplicate some availability checking logic

2019-03-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. This seems reasonable to me. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59394/new/ https://reviews.llvm.org/D59394

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-03-19 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. It would be nice to have a review for this year old (updated) patch. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-03-19 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 191371. Herald added a subscriber: jdoerfert. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td includ

r356508 - Add --unwindlib=[libgcc|compiler-rt] to parallel --rtlib= [take 2]

2019-03-19 Thread Sterling Augustine via cfe-commits
Author: saugustine Date: Tue Mar 19 13:01:59 2019 New Revision: 356508 URL: http://llvm.org/viewvc/llvm-project?rev=356508&view=rev Log: Add --unwindlib=[libgcc|compiler-rt] to parallel --rtlib= [take 2] "clang++ hello.cc --rtlib=compiler-rt" now can works without specifying additional unwind or

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added subscribers: jyknight, eli.friedman, erichkeane. erichkeane added a comment. Herald added a reviewer: jfb. Herald added subscribers: llvm-commits, jfb. Herald added a project: LLVM. @mgorny @hfinkel @eli.friedman @jyknight @dim Is there any chance we can get this in any time soon?

[PATCH] D59557: Fix CodeGen/arm64-microsoft-status-reg.cpp test

2019-03-19 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht created this revision. rupprecht added reviewers: arsenm, MatzeB. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar, wdng. Herald added a project: clang. This test is failing after r356499. Update the register selection used in the test. Repository: rG LLVM Github Mo

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Why was it reverted? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28213/new/ https://reviews.llvm.org/D28213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

r356513 - [OPENMP]Warn if the different allocator is used for the variable.

2019-03-19 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Mar 19 13:33:44 2019 New Revision: 356513 URL: http://llvm.org/viewvc/llvm-project?rev=356513&view=rev Log: [OPENMP]Warn if the different allocator is used for the variable. If the allocator was specified for the variable and next one is found with the different allocato

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-19 Thread Hao Wu via Phabricator via cfe-commits
wuhao5 added a comment. In D58514#1435296 , @rjmccall wrote: > In D58514#1435228 , @wuhao5 wrote: > > > > Okay, so really just a block self-reference. We could really just add a > > > feature for that that would a

r356515 - Add a spelling of pass_object_size that uses __builtin_dynamic_object_size

2019-03-19 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Mar 19 13:44:18 2019 New Revision: 356515 URL: http://llvm.org/viewvc/llvm-project?rev=356515&view=rev Log: Add a spelling of pass_object_size that uses __builtin_dynamic_object_size The attribute pass_dynamic_object_size(n) behaves exactly like pass_object_size(n), but in

[PATCH] D59557: Fix CodeGen/arm64-microsoft-status-reg.cpp test

2019-03-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59557/new/ https://reviews.llvm.org/D59557 ___

[PATCH] D58757: Add a version of the pass_object_size attribute that works with builtin_dynamic_object_size

2019-03-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356515: Add a spelling of pass_object_size that uses __builtin_dynamic_object_size (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D58757?vs=190917&id=191386#toc R

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D58514#1435431 , @wuhao5 wrote: > In D58514#1435296 , @rjmccall wrote: > > > In D58514#1435228 , @wuhao5 wrote: > > > > > > Okay, so really just

[PATCH] D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-03-19 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57978/new/ https://reviews.llvm.org/D57978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. It looks like it was reverted because it was breaking i386 BSD, where __GCC_ATOMIC_LLONG_LOCK_FREE is in fact supposed to be "1" (because cmpxchg8b isn't always available). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28213/new/ https:

[PATCH] D59560: Permit redeclarations of a builtin to specify calling convention.

2019-03-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added a reviewer: rnk. Herald added a subscriber: javed.absar. After https://reviews.llvm.org/rL355317 we noticed that quite a decent amount of code redeclares builtins (memcpy in particular, I believe reduced from an MSVC header) with a calling convent

r356517 - Fix CodeGen/arm64-microsoft-status-reg.cpp test

2019-03-19 Thread Jordan Rupprecht via cfe-commits
Author: rupprecht Date: Tue Mar 19 13:55:14 2019 New Revision: 356517 URL: http://llvm.org/viewvc/llvm-project?rev=356517&view=rev Log: Fix CodeGen/arm64-microsoft-status-reg.cpp test Summary: This test is failing after r356499 (verified with `ninja check-clang-codegen`). Update the register sel

[PATCH] D59557: Fix CodeGen/arm64-microsoft-status-reg.cpp test

2019-03-19 Thread Jordan Rupprecht via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356517: Fix CodeGen/arm64-microsoft-status-reg.cpp test (authored by rupprecht, committed by ). Changed prior to commit: https://reviews.llvm.org/D59557?vs=191379&id=191390#toc Repository: rC Clang

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D28213#1435485 , @efriedma wrote: > It looks like it was reverted because it was breaking i386 BSD, where > __GCC_ATOMIC_LLONG_LOCK_FREE is in fact supposed to be "1" (because cmpxchg8b > isn't always available). Do we care abou

[PATCH] D59557: Fix CodeGen/arm64-microsoft-status-reg.cpp test

2019-03-19 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. I thought we weren't supposed to reference asm codegen in clang tests? (PR24580) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59557/new/ https://reviews.llvm.org/D59557 ___ cfe-commits maili

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Do we care about cases where it *might* be available? i.e. can we say it's > never available instead? That doesn't really help here... the fundamental issue is that getMaxAtomicInlineWidth() is wrong (or at least, was wrong at the time this was initially merged; I h

[PATCH] D59557: Fix CodeGen/arm64-microsoft-status-reg.cpp test

2019-03-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Usually no... I wasn't think about it the last time I reviewed a change to this file. Patch welcome to just zap it, assuming we have appropriate coverage in llvm/test/CodeGen/AArch64. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59557

[PATCH] D59560: Permit redeclarations of a builtin to specify calling convention.

2019-03-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3144 + << FunctionType::getNameForCallConv(NewTypeInfo.getCC()) + << 3 /*on builtin function*/; + NewTypeInfo = NewTypeInfo.withCallingConv(OldTypeInfo.getCC()); You can make thes

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. It's still wrong. I think this might fix it? --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -346,9 +346,8 @@ public: (1 << TargetInfo::LongDouble)); // x86-32 has atomics up to 8 bytes -// FIXME: Check tha

[PATCH] D59560: Permit redeclarations of a builtin to specify calling convention.

2019-03-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked an inline comment as done. erichkeane added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3144 + << FunctionType::getNameForCallConv(NewTypeInfo.getCC()) + << 3 /*on builtin function*/; + NewTypeInfo = NewTypeInfo.withCallingConv(OldT

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. It's kind of awkward to use ">=" on a CPU enum, but yes, that's the right idea. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28213/new/ https://reviews.llvm.org/D28213 ___ cfe-commits mailin

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D28213#1435542 , @efriedma wrote: > It's kind of awkward to use ">=" on a CPU enum, but yes, that's the right > idea. I agree, but we do the same thing on the "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8" define in X86.cpp. App

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-03-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I see! I only took a quick look, but this looks exactly like what @rsmith has been asking for in discussions for a long time now: a more explicit AST representation of uuid of uuidof in template arguments. I'll make an effort to get his attention and see if this addresses h

[PATCH] D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-03-19 Thread Hideki Saito via Phabricator via cfe-commits
hsaito added a comment. In D57978#1435473 , @Meinersbur wrote: > ping This is a good follow up for rL348944 , but I have no familiarity to the code under Clang. So, let me thank you for doing this work and move myself

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Patch here https://reviews.llvm.org/D59566 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28213/new/ https://reviews.llvm.org/D28213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59560: Permit redeclarations of a builtin to specify calling convention.

2019-03-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 191403. erichkeane added a comment. As @rnk suggested, switch to an enum. SemaType.cpp unfortunately has Sema as a forward declaration, so it has to use integers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59560/new/ https://reviews.llvm.org

r356530 - Replace tok::angle_string_literal with new tok::header_name.

2019-03-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Mar 19 15:09:55 2019 New Revision: 356530 URL: http://llvm.org/viewvc/llvm-project?rev=356530&view=rev Log: Replace tok::angle_string_literal with new tok::header_name. Use the new kind for both angled header-name tokens and for double-quoted header-name tokens. This is

[PATCH] D59440: add steps to preprocess file and reduce command line args

2019-03-19 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 191409. akhuang added a comment. style things CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59440/new/ https://reviews.llvm.org/D59440 Files: clang/utils/creduce-clang-crash.py Index: clang/utils/creduce-clang-crash.py ==

[PATCH] D59567: [X86] Add __popcntd and __popcntq to ia32intrin.h to match gcc and icc. Remove popcnt feature flag from _popcnt32/_popcnt64 and move to ia32intrin.h to match gcc

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: RKSimon, spatel, andreadb. gcc and icc both implement __popcntd and __popcntq which we did not. gcc doesn't seem to require a feature flag for the _popcnt32/_popcnt64 spelling and will use a libcall if its not supported. https:/

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-19 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 191408. Tyker added a comment. Herald added a subscriber: jdoerfert. added diagnostics for contradictory attributes like for if: if (...) [[likely]] return 1; else [[likely]] return 2; handled the codegen for If to generate builtin_expect but i pro

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-19 Thread Thorsten via Phabricator via cfe-commits
thorsten-klein added a comment. Hello, can you please support with this Pull-Request? You really have better knowledge about source code. For our case this solution was working fine and I wanted to share with you. Maybe it will help you if I create an examplary project which reproduces the me

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-19 Thread Thorsten via Phabricator via cfe-commits
thorsten-klein updated this revision to Diff 191415. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59135/new/ https://reviews.llvm.org/D59135 Files: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp Index: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp ==

[PATCH] D59523: Thread Safety: also look at ObjC methods

2019-03-19 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 191416. jfb added a comment. - Use suggested format. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59523/new/ https://reviews.llvm.org/D59523 Files: lib/Analysis/ThreadSafetyCommon.cpp Index: lib/Analysis/ThreadSafetyCommon.

[PATCH] D59523: Thread Safety: also look at ObjC methods

2019-03-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I reduced the code I had to this: struct __attribute__((capability("mutex"))) MyLock { void lock() __attribute__((acquire_capability())) {} void unlock() __attribute__((release_capability())) {} }; template struct __attribute__((scoped_lockable)) Locker {

[PATCH] D59523: Thread Safety: also look at ObjC methods

2019-03-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Actually I'm wrong, this repros properly, will send an update with test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59523/new/ https://reviews.llvm.org/D59523 ___ cfe-commits mailing list cfe-

[PATCH] D59523: Thread Safety: also look at ObjC methods

2019-03-19 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 191417. jfb added a comment. - Add test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59523/new/ https://reviews.llvm.org/D59523 Files: lib/Analysis/ThreadSafetyCommon.cpp test/SemaObjCXX/no-crash-thread-safety-analysis.mm

[PATCH] D59520: [WebAssembly] Address review comments on r352930

2019-03-19 Thread Dan Gohman via Phabricator via cfe-commits
sunfish added a comment. In D59520#1434854 , @aaron.ballman wrote: > > Removes errnoneous use of diag::err_alias_is_definition, which turned out > > to be ineffective anyway since functions can be defined later in the > > translation unit and avoid dete

[PATCH] D59520: [WebAssembly] Address review comments on r352930

2019-03-19 Thread Dan Gohman via Phabricator via cfe-commits
sunfish marked an inline comment as done. sunfish added inline comments. Comment at: test/Sema/attr-wasm.c:3 + +void name_a() {} + aaron.ballman wrote: > Was this intended to be used somewhere? Probably can just be removed if not. No, you're right that we don't n

[PATCH] D47849: [OpenMP][Clang][NVPTX] Enable math functions called in an OpenMP NVPTX target device region to be resolved as device-native function calls

2019-03-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. We need to make progress on this, and I'd like to suggest a path forward... First, we have a fundamental problem here: Using host headers to declare functions for the device execution environment isn't sound. Those host headers can do anything, and while some platforms

[PATCH] D59573: [analyzer] C++17: PR41142: Ignore transparent InitListExprs when finding construction contexts.

2019-03-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, mikhail.ramalho, Szelethus, baloghadamsoftware, Charusso, alexfh. Herald added subscribers: cfe-commits, jdoerfert, dkrupp, donat.nagy, a.sidorin, szepet. Herald added a project: clang. This addresses a fe

Re: r356222 - [analyzer] Support C++17 aggregates with bases without constructors.

2019-03-19 Thread Artem Dergachev via cfe-commits
On 3/19/19 11:10 AM, Richard Smith wrote: It sounds like there might be a missing check for InitListExpr::isTransparent somewhere. (A transparent InitListExpr should be treated as equivalent to its one and only subexpression.) Either that, or the static analyzer isn't aware that an object of c

[PATCH] D59573: [analyzer] C++17: PR41142: Ignore transparent InitListExprs when finding construction contexts.

2019-03-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59573/new/ https://reviews.llvm.org/D59573 ___ cfe-commits ma

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D59449#1435032 , @alexfh wrote: > How is this functionality different from the clang-tidy-diff.py script with > the -j option being added in the other patch? It's the same. Repository: rCTE Clang Tools Extra CHANGES S

<    1   2