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

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

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

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

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

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

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

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

[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

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

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:

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

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,

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

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

[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

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

[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] D59529: Refactor cast<>'s in if conditionals, which can only assert on failure.

2019-03-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356441: Refactor casts in if conditionals, which can only assert on failure. (authored by dhinton, committed by ). Changed prior to commit: https://reviews.llvm.org/D59529?vs=191228=191248#toc

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

2019-03-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. One more gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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. Any comments? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2019-03-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/utils/creduce-clang-crash.py:45 + result = [] + for i, arg in enumerate(cmd): +if arg.startswith('$'): Useless enumerate here. You could even use a list comprehension here ``` return ' '.join(arg

[PATCH] D59533: [X86] Add __crc32b/__crc32w/__crc32d/__crc32q intrinsics to match gcc and icc.

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 191251. craig.topper added a comment. Add the test file that I forgot to git add before running arcanist Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59533/new/ https://reviews.llvm.org/D59533 Files:

[PATCH] D59533: [X86] Add __crc32b/__crc32w/__crc32d/__crc32q intrinsics to match gcc and icc.

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: spatel, RKSimon. Herald added a project: clang. craig.topper updated this revision to Diff 191251. craig.topper added a comment. Add the test file that I forgot to git add before running arcanist gcc has these intrinsics in

[PATCH] D59487: [Tooling] Add more scope specifiers until spelling is not ambiguous.

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: lib/Tooling/Core/Lookup.cpp:165 +if (UnspelledScopes.empty()) { + Disambiguated = "::" + Disambiguated; +} else { ioeric wrote: > kadircet wrote: > > maybe return or break afterwards? > I also struggled a

r356441 - Refactor cast<>'s in if conditionals, which can only assert on failure.

2019-03-19 Thread Don Hinton via cfe-commits
Author: dhinton Date: Mon Mar 18 23:14:14 2019 New Revision: 356441 URL: http://llvm.org/viewvc/llvm-project?rev=356441=rev Log: Refactor cast<>'s in if conditionals, which can only assert on failure. Summary: This patch refactors several instances of cast<> used in if conditionals. Since

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 191257. teemperor retitled this revision from "[ASTImporter] Allow adding a shim to the ASTImporter" to "[ASTImporter] Allow adding a import strategy to the ASTImporter". teemperor edited the summary of this revision. teemperor added a comment. Thanks for

[PATCH] D59415: Do not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.

2019-03-19 Thread Igor Kudrin via Phabricator via cfe-commits
ikudrin marked an inline comment as done. ikudrin added inline comments. Comment at: test/Frontend/absolute-paths-windows.test:4 +// RUN: mkdir -p %t.dir\real +// RUN: cmd /c mklink /j %t.dir\junc %t.dir\real +// RUN: echo "wrong code" > %t.dir\real\foo.cpp

[PATCH] D59516: [analyzer] Make GenericTaintChecker configurable

2019-03-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. I'm very much guilty of doing functional and refactoring changes within the same patch, but I think working on `GenericTaintChecker` AND in the same patch doing (seemingly

[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#1433796 , @arsenm wrote: > Should it be downgraded to a warning about an extension instead of just > removing it? What would you suggest to put in a warning message? Clang normally doesn't warn about extensions...

[PATCH] D59292: [clang-format] messes up indentation when using JavaScript private fields and methods

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added subscribers: mitchellwills, mprobst. MyDeveloperDay added a comment. ping @mprobst,@mitchellwills noticed you just reviewed another clang-format-js commit, wondered if you were interested in reviewing this for me?, finding it hard to get any review traction. CHANGES

r356449 - [clang-format] [JS] handle private members.

2019-03-19 Thread Martin Probst via cfe-commits
Author: mprobst Date: Tue Mar 19 05:28:41 2019 New Revision: 356449 URL: http://llvm.org/viewvc/llvm-project?rev=356449=rev Log: [clang-format] [JS] handle private members. Addresses PR40999 https://bugs.llvm.org/show_bug.cgi?id=40999 Private fields and methods in JavaScript would get

[PATCH] D59292: [clang-format] messes up indentation when using JavaScript private fields and methods

2019-03-19 Thread Martin Probst via Phabricator via cfe-commits
mprobst closed this revision. mprobst added a comment. Landed in r356449, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59292/new/ https://reviews.llvm.org/D59292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > We can't reliable import templates with the ASTImporter, so actually > reconstructing the template in the debug info AST and then importing it > doesn't work. Could you please elaborate how the import of templates fails in ASTImporter? Is it because the AST you

r356450 - [OpenCL] Improved testing of default header.

2019-03-19 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Mar 19 06:04:17 2019 New Revision: 356450 URL: http://llvm.org/viewvc/llvm-project?rev=356450=rev Log: [OpenCL] Improved testing of default header. Improved some checks and moved testing of the default header in C++ mode into the Headers folder. Differential Revision:

[PATCH] D59292: [clang-format] messes up indentation when using JavaScript private fields and methods

2019-03-19 Thread Martin Probst via Phabricator via cfe-commits
mprobst accepted this revision. mprobst added a comment. This revision is now accepted and ready to land. Actually I'll fix the nits. Comment at: clang/docs/ReleaseNotes.rst:174 -- ... +- Add support for correct indenting of private fields and methods in Javascript.

[PATCH] D59486: [OpenCL] Improve testing of default header in C++ mode

2019-03-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: test/Headers/opencl-c-header.cl:57-65 char f(char x) { -#if __OPENCL_C_VERSION__ != CL_VERSION_2_0 +#if !defined(__OPENCL_CPP_VERSION__) && (__OPENCL_C_VERSION__ != CL_VERSION_2_0)

[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM (landed here too https://github.com/mydeveloperday/clang-experimental/releases) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55170/new/

[PATCH] D59486: [OpenCL] Improve testing of default header in C++ mode

2019-03-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356450: [OpenCL] Improved testing of default header. (authored by stulova, committed by ). Herald added a project: clang. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. > I don't follow why this can over-count, FileIndex keeps only one RefSlab per > each file, so we can't over-count? Did you mean it will be more than #TUs ? Yes. This is how `Symbol::References` is described in its documentation. If we want to change/expand the

[PATCH] D59457: [analyzer][NFC] Use capital variable names, move methods out-of-line, rename some in CheckerRegistry

2019-03-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D59457#1433180 , @baloghadamsoftware wrote: > Please rename the patch. Its name does not really express its content. Good point, sorry about that. In D59457#1433816 , @xazax.hun

r356446 - [Tooling] Add more scope specifiers until spelling is not ambiguous.

2019-03-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 19 03:12:15 2019 New Revision: 356446 URL: http://llvm.org/viewvc/llvm-project?rev=356446=rev Log: [Tooling] Add more scope specifiers until spelling is not ambiguous. Summary: Previously, when the renamed spelling is ambiguous, we simply use the full-qualfied name

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:170 I.first->second = mergeSymbol(I.first->second, Sym); +// We re-count number of references while merging refs from scratch. +

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Another observation: The `Import` function of the strategy now has no way to return an error. An even better version of it would be to include the possibility of import error (with `ImportError`, or other error type). Or the "PreImport" function could indicate if the

r356447 - [clang-format] [JS] Don't break between template string and tag

2019-03-19 Thread Martin Probst via cfe-commits
Author: mprobst Date: Tue Mar 19 04:15:52 2019 New Revision: 356447 URL: http://llvm.org/viewvc/llvm-project?rev=356447=rev Log: [clang-format] [JS] Don't break between template string and tag Before: const x = veryLongIdentifier `hello`; After: const x =

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2019-03-19 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. Yes, I considered it. But Microsoft documentation is not clear whether it will work or not for restoring inconsistent locales. The documentation shows how to save inconsistent locales with LC_ALL but doesn't provide an example for restoring them. Repository: rL

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added a comment. In D59481#1432881 , @ioeric wrote: > I'm not sure if FileIndex is the correct layer to make decision about how > References is calculated. Currently, we have two use cases in clangd 1)

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @ioeric is the author of these completion metrics and evaluation tools. Eric, please feel free to correct me if I got something wrong or missed something. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/

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

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D59302#1431274 , @kadircet wrote: > The optional part is rather limiting number of diagnostics that is going to > be surfaced. So if you have thousands of errors inside preamble only first > 100 of them will appear

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

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: JonasToth, aaron.ballman, alexfh, michaelplatings. MyDeveloperDay added a project: clang-tools-extra. Herald added subscribers: jdoerfert, xazax.hun. While testing clang-tidy for D59251: [Documentation] Proposal for plan to

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It looks better now. One "problem" is that now there is the strategy and there is the `Imported` function. It would be possible to unify these into a strategy that contains maybe a "import" and a "post-import" callback. (But this requires big changes in the

  1   2   >