[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

[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

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

[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

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

[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

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

[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 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:

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

[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

[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.

[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

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=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 in

[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/

[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

[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

[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

[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.

[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

[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 =

[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

[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

[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

[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

[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

[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

[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=191390#toc Repository: rC Clang

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

[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

[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/

[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

[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=191386#toc

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

[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

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=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 allocator,

[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

[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

[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

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

[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

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

r356507 - Move options to separate checks that do not need to immediately follow the previous option. NFCI

2019-03-19 Thread Douglas Yung via cfe-commits
Author: dyung Date: Tue Mar 19 12:34:15 2019 New Revision: 356507 URL: http://llvm.org/viewvc/llvm-project?rev=356507=rev Log: Move options to separate checks that do not need to immediately follow the previous option. NFCI Modified: cfe/trunk/test/Driver/hip-toolchain-mllvm.hip Modified:

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-03-19 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 created this revision. boga95 added reviewers: Szelethus, xazax.hun, dkrupp, NoQ. Herald added subscribers: cfe-commits, Charusso, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, whisperity. Herald added a project: clang. Parse the yaml configuration file and

[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#1435228 , @wuhao5 wrote: > > Okay, so really just a block self-reference. We could really just add a > > feature for that that would avoid both the complexity and the expense of > > the self-capture dance. > > Is

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 191366. Anastasia added a comment. Instead of removing the diagnostic completely change into a warning in pedantic mode. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59492/new/ https://reviews.llvm.org/D59492 Files:

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D59492#1434822 , @arsenm wrote: > In D59492#1434636 , @Anastasia wrote: > > > In D59492#1433796 , @arsenm wrote: > > > > > Should it be

[PATCH] D56924: Special case ObjCPropertyDecl for printing

2019-03-19 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56924/new/ https://reviews.llvm.org/D56924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57965: Clean up ObjCPropertyDecl printing

2019-03-19 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. friendly ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57965/new/ https://reviews.llvm.org/D57965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57896: Variable names rule

2019-03-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D57896#1435245 , @lattner wrote: > FWIW, my suggestion is *not* to expand names like DRE to decl_ref_expr, I > agree that doesn't add clarity to the code. Two possibilities: "dre", or > "decl" which is what I would write

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 5 inline comments as done. MyDeveloperDay added inline comments. Comment at: test/clang-tidy/readability-identifier-naming.cpp:509 +// CHECK-FIXES: {{^}} bool columns=false; + auto ptr=[&]{return Columns;}(); +// CHECK-FIXES: {{^}} auto ptr=[&]{return

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 191365. MyDeveloperDay added a comment. Address review comments This may not be a more satisfactory solution but it at least now covers the other cases raised by @JonasToth Add more tests around this area. CHANGES SINCE LAST ACTION

[PATCH] D57896: Variable names rule

2019-03-19 Thread Chris Lattner via Phabricator via cfe-commits
lattner added a comment. In D57896#1434877 , @Charusso wrote: > static Optional > getConcreteIntegerValue(const Expr *CondVarExpr, const ExplodedNode *N) { > //... > > if (const auto *DRE = dyn_cast_or_null(CondVarExpr)) { > if (const auto *VD =

r356497 - Fix unused variable warning. NFCI.

2019-03-19 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Tue Mar 19 11:39:46 2019 New Revision: 356497 URL: http://llvm.org/viewvc/llvm-project?rev=356497=rev Log: Fix unused variable warning. NFCI. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp URL:

r356496 - [OPENMP]Check that global vars require predefined allocator.

2019-03-19 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Mar 19 11:39:11 2019 New Revision: 356496 URL: http://llvm.org/viewvc/llvm-project?rev=356496=rev Log: [OPENMP]Check that global vars require predefined allocator. According to OpenMP, 2.11.3 allocate Directive, Restrictions, C / C++, if a list item has a static storage

[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. > Okay, so really just a block self-reference. We could really just add a > feature for that that would avoid both the complexity and the expense of the > self-capture dance. Is there a plan to cover this case? or is it a legitimate use case that Clang should

[PATCH] D59388: Basic: Return a reference from FileManager::getVirtualFileSystem, NFC

2019-03-19 Thread Jan Korous via Phabricator via cfe-commits
jkorous accepted this revision. jkorous added a comment. This revision is now accepted and ready to land. In D59388#1433233 , @dexonsmith wrote: > Yes, it's safe. The reference count is "intrusive", meaning it's stored in > the object itself (via

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

2019-03-19 Thread Richard Smith via cfe-commits
On Tue, 19 Mar 2019 at 10:24, Artem Dergachev via cfe-commits wrote: > > Hi, > > I'll try to fix this ASAP! 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.)

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:54 +/// boolean expression language for constructing filters. +class MatchFilter { +public: ilya-biryukov wrote: >

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

2019-03-19 Thread Alexander Kornienko via cfe-commits
On Tue, Mar 19, 2019 at 6:24 PM Artem Dergachev wrote: > Hi, > > I'll try to fix this ASAP! > Thanks! > It sounds as if i don't have nearly enough C++17 codebases for testing, > are there any obvious open-source projects that you could recommend? No, but this particular example comes from

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet planned changes to this revision. kadircet added a comment. - Limit per include directive - Use hardcoded value for limit Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302

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

2019-03-19 Thread Artem Dergachev via cfe-commits
Hi, I'll try to fix this ASAP! It sounds as if i don't have nearly enough C++17 codebases for testing, are there any obvious open-source projects that you could recommend? I'd love to try to reincarnate http://green.lab.llvm.org/green/view/Experimental/job/StaticAnalyzerBenchmarks/ with

[PATCH] D59544: [OpenCL] Minor improvements in default header testing

2019-03-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356479: [OpenCL] Minor improvements in default header testing (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r356480 - [OPENMP]Remove unused parameter, NFC.

2019-03-19 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Mar 19 10:09:52 2019 New Revision: 356480 URL: http://llvm.org/viewvc/llvm-project?rev=356480=rev Log: [OPENMP]Remove unused parameter, NFC. Parameter CodeGenModule is not required for CGOpenMPRuntime member functions, since class holds the reference to the CGM.

r356479 - [OpenCL] Minor improvements in default header testing

2019-03-19 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Mar 19 10:09:06 2019 New Revision: 356479 URL: http://llvm.org/viewvc/llvm-project?rev=356479=rev Log: [OpenCL] Minor improvements in default header testing Differential Revision: https://reviews.llvm.org/D59544 Modified: cfe/trunk/test/Headers/opencl-c-header.cl

[PATCH] D59360: [clang-tidy] Fix more false positives for bugprone-string-integer-assignment

2019-03-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp:115 +Expr::EvalResult EvalResult; +if (!E->EvaluateAsInt(EvalResult, Ctx, Expr::SE_AllowSideEffects)) + return false; courbet wrote: >

[PATCH] D59367: [Sema] Adjust address space of operands in remaining builtin operators

2019-03-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D59367#1434353 , @rjmccall wrote: > This patch LGTM. > > You might consider adding tests for weird cases like class types with > conversion operators to reference types. To a certain extent that sort of > thing is

[PATCH] D59367: [Sema] Adjust address space of operands in remaining builtin operators

2019-03-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356475: [Sema] Adjust addr space of reference operand in compound assignment (authored by stulova, committed by ). Herald added a subscriber: kristina. Herald added a project: clang. Repository: rC

r356475 - [Sema] Adjust addr space of reference operand in compound assignment

2019-03-19 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Mar 19 09:50:21 2019 New Revision: 356475 URL: http://llvm.org/viewvc/llvm-project?rev=356475=rev Log: [Sema] Adjust addr space of reference operand in compound assignment When we create overloads for the builtin compound assignment operators we need to preserve address

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:790 if (const auto *DeclRef = Result.Nodes.getNodeAs("declRef")) { -SourceRange Range = DeclRef->getNameInfo().getSourceRange(); -addUsage(NamingCheckFailures,

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

2019-03-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. How is this functionality different from the clang-tidy-diff.py script with the -j option being added in the other patch? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449

r356472 - [OPENMP] Codegen for local variables with the allocate pragma.

2019-03-19 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Mar 19 09:41:16 2019 New Revision: 356472 URL: http://llvm.org/viewvc/llvm-project?rev=356472=rev Log: [OPENMP] Codegen for local variables with the allocate pragma. Added initial codegen for the local variables with the #pragma omp allocate directive. Instead of

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

2019-03-19 Thread Alexander Kornienko via cfe-commits
Filed this as https://bugs.llvm.org/show_bug.cgi?id=41142. Any hope for a prompt fix here? On Tue, Mar 19, 2019 at 5:34 PM Alexander Kornienko wrote: > A reduced test case: > $ cat test-RegionStoreManager__bindStruct.cc > struct a {}; > class b : a {}; > b c() { b d{c()}; } > $ ./clang-tidy

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

2019-03-19 Thread Alexander Kornienko via cfe-commits
A reduced test case: $ cat test-RegionStoreManager__bindStruct.cc struct a {}; class b : a {}; b c() { b d{c()}; } $ ./clang-tidy -checks="-*,clang-analyzer*" test-RegionStoreManager__bindStruct.cc -- -std=c++17 assert.h assertion failed at tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2362

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-03-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a nit Comment at: clang-tidy/tool/clang-tidy-diff.py:90 + # the top level key 'Diagnostics' in the output yaml files + mergekey="Diagnostics" + merged=[]

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 191323. kadircet marked 2 inline comments as done. kadircet added a comment. - Show include stack in diagnostic message - Point to exact include location Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Thanks for fixing this! Could you expand the test a bit? See the inline comment. Comment at: test/clang-tidy/readability-identifier-naming.cpp:506 +bool Foo() { + bool Columns=false; +// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 191311. MyDeveloperDay added a comment. Minor modification to improve the `[=]` case `[]` and `[Columns]` are not yet fixed and will not be correctly renamed to `[]` and `[columns]` But at least they are left unaltered CHANGES SINCE LAST ACTION

[PATCH] D54978: Move the SMT API to LLVM

2019-03-19 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho marked an inline comment as done. mikhail.ramalho added a comment. Fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54978/new/ https://reviews.llvm.org/D54978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54978: Move the SMT API to LLVM

2019-03-19 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 191305. mikhail.ramalho added a comment. Fix copy-and-paste error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54978/new/ https://reviews.llvm.org/D54978 Files: clang/CMakeLists.txt clang/cmake/modules/FindZ3.cmake

[PATCH] D59461: [analyzer] Fix an assertion failure if plugins added dependencies

2019-03-19 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware accepted this revision. baloghadamsoftware added a comment. This revision is now accepted and ready to land. This one seems straightforward. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59461/new/ https://reviews.llvm.org/D59461

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay planned changes to this revision. MyDeveloperDay added a comment. In D59540#1434837 , @JonasToth wrote: > What happens on `[=]() ...`, direct capture `[]()...` and > `[Columns]()...`? Thanks for the review... in answer to your question..

[PATCH] D45978: dllexport const variables must have external linkage.

2019-03-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. > Would you mind committing the changes please? Thanks. Happy to do so! I've committed in r356458. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D45978/new/ https://reviews.llvm.org/D45978

r356458 - Ensure that const variables declared at namespace scope correctly have external linkage when marked as dllexport and targeting the MSVC ABI.

2019-03-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Mar 19 07:53:52 2019 New Revision: 356458 URL: http://llvm.org/viewvc/llvm-project?rev=356458=rev Log: Ensure that const variables declared at namespace scope correctly have external linkage when marked as dllexport and targeting the MSVC ABI. Patch thanks to

[PATCH] D57896: Variable names rule

2019-03-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added subscribers: chandlerc, Charusso. Charusso added a comment. In D57896#1406812 , @lattner wrote: > I can understand Zach's position here, but LLDB has historically never > conformed to the general LLVM naming or other conventions due to its

[PATCH] D59546: [clang-format] structured binding in range for detected as Objective C

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: djasper, klimek, JonasToth, reuk. MyDeveloperDay added a project: clang-tools-extra. Sometime after 6.0.0 and the current trunk 9.0.0 the following code would be considered as objective C and not C++ Reported by:

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D59466#1434841 , @baloghadamsoftware wrote: > Great work! Thank you! I only have minor comment: did you consider moving the > refactoring of `ExceptionAnalyzer` into a separate (prerequisite) patch? Yes, absolutely, that

Re: r352930 - [WebAssembly] Add an import_field function attribute

2019-03-19 Thread Aaron Ballman via cfe-commits
On Mon, Mar 18, 2019 at 7:08 PM Dan Gohman wrote: > > > > On Fri, Mar 15, 2019 at 10:55 AM Aaron Ballman wrote: >> >> >> Ping. > > > I apologize for the extraordinarily delays here. I've now posted a patch to > address the review comments here: > > https://reviews.llvm.org/D59520 Delays happen

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

2019-03-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I love functional changes that remove code and add tests -- thank you for these! > 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

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-19 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Great work! Thank you! I only have minor comment: did you consider moving the refactoring of `ExceptionAnalyzer` into a separate (prerequisite) patch? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59466/new/

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. What happens on `[=]() ...`, direct capture `[]()...` and `[Columns]()...`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59540/new/ https://reviews.llvm.org/D59540 ___ cfe-commits mailing list

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-19 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D59492#1434636 , @Anastasia wrote: > In D59492#1433796 , @arsenm wrote: > > > Should it be downgraded to a warning about an extension instead of just > > removing it? > > > What would

[PATCH] D59544: [OpenCL] Minor improvements in default header testing

2019-03-19 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59544/new/ https://reviews.llvm.org/D59544 ___ cfe-commits mailing list

  1   2   >