[PATCH] D59529: Refactor cast<>'s in if conditionals, which can only assert on failure.

2019-03-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356441: Refactor cast<>'s 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&id=191248#toc Re

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

2019-03-18 Thread Don Hinton via cfe-commits
m.org/pipermail/cfe-commits/Week-of-Mon-20190318/265044.html Differential Revision: https://reviews.llvm.org/D59529 Modified: cfe/trunk/lib/AST/ASTImporter.cpp cfe/trunk/lib/AST/DeclBase.cpp cfe/trunk/lib/CodeGen/CGExprConstant.cpp cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp cfe/trunk

[PATCH] D59448: [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Heejin Ahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356436: [WebAssembly] Change wasm.throw's first argument to an immediate (authored by aheejin, committed by ). Changed prior to commit: https://reviews.llvm.org/D59448?vs=191240&id=191241#toc Repositor

r356436 - [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Mon Mar 18 21:58:59 2019 New Revision: 356436 URL: http://llvm.org/viewvc/llvm-project?rev=356436&view=rev Log: [WebAssembly] Change wasm.throw's first argument to an immediate Summary: `wasm.throw` builtin's first 'tag' argument should be an immediate index into the event s

[PATCH] D59448: [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 191240. aheejin added a comment. - Add `I` to `wasm.throw` builtin's tag argument Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59448/new/ https://reviews.llvm.org/D59448 Files: include/clang/Basic/BuiltinsWebAssembly.def

[PATCH] D59448: [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D59448#1433622 , @craig.topper wrote: > Shouldn't the definition in BuiltinsWebAssembly.def be updated to include an > 'I' in the type string so that this will be properly diagnosed in the > frontend? Done. Thank you for ch

[PATCH] D59448: [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D59448#1433607 , @dschuff wrote: > LGTM; I wonder if it makes sense to have predefined macro for the C++ tag (or > perhaps just a regular macro for use in libcxxabi?) The only place the `throw` builtin will be used in within

[PATCH] D59529: Refactor cast<>'s in if conditionals, which can only assert on failure.

2019-03-18 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59529/new/ https://reviews.llvm.org/D59529 ___ c

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

2019-03-18 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. 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 unimplementable

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-03-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sorry, I've gotten trapped under a backlog and haven't had time to think much about this. I don't want to block progress here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57464/new/ https://reviews.llvm.org/D57464

[PATCH] D58160: MS ABI: adding template static member in the linker directive section to make sure init function can be called before main.

2019-03-18 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D58160#1433458 , @rnk wrote: > lgtm Thank you so much Reid! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58160/new/ https://reviews.llvm.org/D58160 ___

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-03-18 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber marked an inline comment as not done. bernhardmgruber added a comment. Thank you for the rich feedback @aaron.ballman. I found a solution which seems to work for many of my test cases. Comment at: clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:274 + + if

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-03-18 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber updated this revision to Diff 191233. bernhardmgruber marked 7 inline comments as done and 2 inline comments as done. bernhardmgruber added a comment. - extracting specifiers from the return type if it consists of a multitoken built-in type, and preprending it to 'auto'. - extende

[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

2019-03-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 191230. alexfh added a comment. - Fix naming. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59528/new/ https://reviews.llvm.org/D59528 Files: clang-tools-extra/clang-tidy/CMakeLists.txt clang-tools-extra/cl

r356433 - Factor out repeated code parsing and concatenating header-names from

2019-03-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 18 18:51:19 2019 New Revision: 356433 URL: http://llvm.org/viewvc/llvm-project?rev=356433&view=rev Log: Factor out repeated code parsing and concatenating header-names from tokens. We now actually form an angled_string_literal token for a header name by concatenation

r356432 - Don't apply the include depth limit until we actually decide to enter

2019-03-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 18 18:51:17 2019 New Revision: 356432 URL: http://llvm.org/viewvc/llvm-project?rev=356432&view=rev Log: Don't apply the include depth limit until we actually decide to enter the file. NFC unless a skipped #include is found at the final permitted #include level. Modif

[PATCH] D59529: Refactor cast<>'s in if conditionals, which can only assert on failure.

2019-03-18 Thread Don Hinton via Phabricator via cfe-commits
e branch can never be taken. In some cases, the fix is to replace cast<> with dyn_cast<>. While others required the removal of the conditional and some minor refactoring. A discussion can be seen here: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190318/265044.html Repos

[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

2019-03-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 191227. alexfh added a comment. - Fix a typo in the comment. Rearrange paragraphs to make the comment more readable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59528/new/ https://reviews.llvm.org/D59528 Fil

[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

2019-03-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: gribozavr, usaxena95, sammccall. Herald added subscribers: jdoerfert, kbarton, xazax.hun, mgorny, nemanjai. Herald added a project: clang. Add a way to expand modular headers for PPCallbacks. Checks can opt-in for this expansion by overriding t

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

2019-03-18 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. > It should consider both because the attributes can be used on Objective-C as > well. Well, it's not really supported that well though. There are known bugs like https://bugs.llvm.org/show_bug.cgi?id=38892, and I don't really have the time to fix that. (You're fr

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓

2019-03-18 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 3 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/test/clang-tidy/google-runtime-int.m:1 +// RUN: clang-tidy -checks=-*,google-runtime-int %s 2>&1 -- -x objective-c | not grep 'warning:\|error:' +

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

2019-03-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:106-117 + # Check that an empty file is not interesting + # file_to_reduce is hardcoded into the test, so this is a roundabout + # way to run it on an empty

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓

2019-03-18 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 191219. stephanemoore added a comment. Remove redundant specification of `-x objective-c`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59336/new/ https://reviews.llvm.org/D59336 Files: clang-tools-ex

[PATCH] D57230: [analyzer] Toning down invalidation a bit

2019-03-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: Charusso. Hmm, here's another one: struct ListInfo { struct ListInfo *next; }; struct X { struct ListInfo li; int i; }; void list_add(struct ListInfo *list, struct ListInfo *item); void foo(struct ListInfo *list) {

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

2019-03-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 191217. akhuang marked 2 inline comments as done. akhuang added a comment. Fixed typo where it was writing the abspath of the file to the interestingness test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59440/new/ https://reviews.llvm.org/D59440

[PATCH] D59494: AMDGPU: Add support for cross address space synchronization scopes (clang)

2019-03-18 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec accepted this revision. rampitec added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59494/new/ https://reviews.llvm.org/D59494 ___ cfe-commits mailing list cfe-commi

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

2019-03-18 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59523#1434121 , @erik.pilkington wrote: > I don't understand this code at all, but what about `BlockDecl`? Agreed that it has `getParamDecl` as well, and the context would fit. It just seems weird how stuff is repeated, Iw as h

[PATCH] D59494: AMDGPU: Add support for cross address space synchronization scopes (clang)

2019-03-18 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7976 + +Name = Twine(Twine(Name) + Twine("one-as")).str(); + } rampitec wrote: > b-sumner wrote: > > kzhuravl wrote: > > > rampitec wrote: > > > > I think subgroup is in the single addres

[PATCH] D59455: Thread safety analysis: Add note for unlock kind mismatch

2019-03-18 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked 4 inline comments as done. aaronpuchert added inline comments. Comment at: include/clang/Analysis/Analyses/ThreadSafety.h:127 + SourceLocation LocLocked, SourceLocation Loc) {}

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

2019-03-18 Thread Alexander Kornienko via cfe-commits
On Fri, Mar 15, 2019 at 1:21 AM Artem Dergachev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: dergachev > Date: Thu Mar 14 17:22:59 2019 > New Revision: 356222 > > URL: http://llvm.org/viewvc/llvm-project?rev=356222&view=rev > Log: > [analyzer] Support C++17 aggregates with bases

r356430 - Minor renaming as suggested in review [NFC]

2019-03-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Mon Mar 18 17:14:46 2019 New Revision: 356430 URL: http://llvm.org/viewvc/llvm-project?rev=356430&view=rev Log: Minor renaming as suggested in review [NFC] See D59455. Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h cfe/trunk/lib/Sema/Analysi

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

2019-03-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. I don't understand this code at all, but what about `BlockDecl`? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59523/new/ https://reviews.llvm.org/D59523 ___ cfe-commits mailing list

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

2019-03-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Herald added a project: LLVM. I have a bug report - https://bugs.llvm.org/show_bug.cgi?id=41131 - that says that we can reduce the number of calls in __libcpp_locale_guard from 10 to 2 by calling: `setlocale(LC_ALL, ...)` . Was this considered when this patch was cr

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

2019-03-18 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added reviewers: dexonsmith, erik.pilkington. Herald added subscribers: cfe-commits, jdoerfert, jkorous. Herald added a project: clang. jfb added a comment. It seems weird how both do pretty similar things and e.g. duplicate `getParamDecl`. The repro I have is 20M,

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

2019-03-18 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. It seems weird how both do pretty similar things and e.g. duplicate `getParamDecl`. The repro I have is 20M, creduce chokes on it, and manually reducing failed to repro... ☹️ Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59523/new/ https:/

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread John McCall via cfe-commits
On 18 Mar 2019, at 18:05, John McCall wrote: On 18 Mar 2019, at 15:38, Don Hinton wrote: Hi John: I found this investigating the cast assert noted here: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061685.html I subsequently did quick grep and found a number of cases in clang+llvm (d

[PATCH] D59494: AMDGPU: Add support for cross address space synchronization scopes (clang)

2019-03-18 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7976 + +Name = Twine(Twine(Name) + Twine("one-as")).str(); + } b-sumner wrote: > kzhuravl wrote: > > rampitec wrote: > > > I think subgroup is in the single address space even if sequenti

r356427 - Thread safety analysis: Add note for unlock kind mismatch

2019-03-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Mon Mar 18 16:26:54 2019 New Revision: 356427 URL: http://llvm.org/viewvc/llvm-project?rev=356427&view=rev Log: Thread safety analysis: Add note for unlock kind mismatch Summary: Similar to D56967, we add the existing diag::note_locked_here to tell the user where we saw

[PATCH] D59455: Thread safety analysis: Add note for unlock kind mismatch

2019-03-18 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356427: Thread safety analysis: Add note for unlock kind mismatch (authored by aaronpuchert, committed by ). Changed prior to commit: https://reviews.llvm.org/D59455?vs=190968&id=191207#toc Repository:

[PATCH] D59494: AMDGPU: Add support for cross address space synchronization scopes (clang)

2019-03-18 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added a comment. Comment at: lib/CodeGen/TargetInfo.cpp:7976 + +Name = Twine(Twine(Name) + Twine("one-as")).str(); + } kzhuravl wrote: > rampitec wrote: > > I think subgroup is in the single address space even if sequentially > > consistent. > I

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

2019-03-18 Thread Dan Gohman via Phabricator via cfe-commits
sunfish created this revision. sunfish added a reviewer: aaron.ballman. Herald added subscribers: aheejin, jgravelle-google, sbc100, dschuff. Herald added a project: clang. This patch addresses the review comments on r352930: - Removes redundant diagnostic checking code - Removes errnoneous use o

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

2019-03-18 Thread Dan Gohman via cfe-commits
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 Dan ___ cfe-commits mailing list cfe-commi

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

2019-03-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 191199. akhuang marked an inline comment as done. akhuang added a comment. fixed array copy mistake CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59440/new/ https://reviews.llvm.org/D59440 Files: clang/utils/creduce-clang-crash.py Index: clang/u

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓

2019-03-18 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/test/clang-tidy/google-runtime-int.m:1 +// RUN: clang-tidy -checks=-*,google-runtime-int %s 2>&1 -- -x objective-c | not grep 'warning:\|error:' + aaron.ballman wrote: > We typically use `| count

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

2019-03-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Aside from the buglet, I'm happy with this, but I wanted to wait until @george.burgess.iv takes a look. Comment at: clang/utils/creduce-clang-crash.py:44 + +def quote_cmd(cmd): + for i, arg in enumerate(cmd): This modifies cmd in place, s

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓

2019-03-18 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 191198. stephanemoore marked 2 inline comments as done. stephanemoore added a comment. Updated with changes: • Switched to using `| count 0` instead of grep'ing for warnings. • Merged Objective-C and Objective-C++ test cases into single file with multip

r356425 - [MS] Skip vbase construction in abstract class ctors

2019-03-18 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Mar 18 15:41:50 2019 New Revision: 356425 URL: http://llvm.org/viewvc/llvm-project?rev=356425&view=rev Log: [MS] Skip vbase construction in abstract class ctors As background, when constructing a complete object, virtual bases are constructed first. If an exception is thrown

[PATCH] D59494: AMDGPU: Add support for cross address space synchronization scopes (clang)

2019-03-18 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl updated this revision to Diff 191193. kzhuravl marked an inline comment as done. kzhuravl added a comment. Address review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59494/new/ https://reviews.llvm.org/D59494 Files: lib/CodeGen/CGAtomic.cpp lib/CodeGen/TargetIn

[PATCH] D59494: AMDGPU: Add support for cross address space synchronization scopes (clang)

2019-03-18 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7976 + +Name = Twine(Twine(Name) + Twine("one-as")).str(); + } rampitec wrote: > I think subgroup is in the single address space even if sequentially > consistent. I have synced with @t-

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

2019-03-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 191192. akhuang added a comment. Modify interestingness test to take file as input 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-clan

[PATCH] D59516: [analyzer] Make GenericTaintChecker configurable

2019-03-18 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 created this revision. boga95 added reviewers: NoQ, Szelethus, xazax.hun, dkrupp. boga95 added a project: clang. Herald added subscribers: cfe-commits, Charusso, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, whisperity. One can pass a configuration file to t

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-03-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D58548/new/ https://reviews.llvm.org/D58548 __

[PATCH] D59346: [X86] Add gcc rotate intrinsics to ia32intrin.h

2019-03-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356423: [X86] Add gcc rotate intrinsics to ia32intrin.h (authored by ctopper, committed by ). Changed prior to commit: https://reviews.llvm.org/D59346?vs=190943&id=191189#toc Repository: rC Clang CH

r356423 - [X86] Add gcc rotate intrinsics to ia32intrin.h

2019-03-18 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Mar 18 15:25:57 2019 New Revision: 356423 URL: http://llvm.org/viewvc/llvm-project?rev=356423&view=rev Log: [X86] Add gcc rotate intrinsics to ia32intrin.h This is another attempt at what Erich Keane tried to do in r355322. This adds rolb, rolw, rold, rolq and their ror

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread John McCall via cfe-commits
On 18 Mar 2019, at 15:38, Don Hinton wrote: Hi John: I found this investigating the cast assert noted here: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061685.html I subsequently did quick grep and found a number of cases in clang+llvm (didn't find any in other projects) . I'm happy t

[PATCH] D59455: Thread safety analysis: Add note for unlock kind mismatch

2019-03-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Analysis/Analyses/ThreadSafety.h:127 + SourceLocation LocLocked, SourceLocation Loc) {} aaronpuchert wrote: > aaron.

[PATCH] D59457: [analyzer][NFC] Use capital variable names in CheckerRegistry

2019-03-18 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I did not check the patch yet but wanted to point out that we might not want to rush about renaming all the variables until the community decides on the coding guideline, see https://reviews.llvm.org/D59251 Repository: rC Clang CHANGES SINCE LAST ACTION https://

[PATCH] D58668: [ASTImporter] Fix redecl failures of FunctionTemplateSpec

2019-03-18 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58668/new/ https://reviews.llvm.org/D58668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

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

2019-03-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Should it be downgraded to a warning about an extension instead of just removing it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59492/new/ https://reviews.llvm.org/D59492 ___ cfe-commits mailing list cfe-commits@

[PATCH] D58827: [Sema][NFCI] Don't allocate storage for the various CorrectionCandidateCallback unless we are going to do some typo correction

2019-03-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. I think this is worth the complexity of the repeated clone methods. lgtm Comment at: lib/Sema/SemaType.cpp:5911 ExprResult AddrSpace = S.ActOnIdExpression( - S.getC

[PATCH] D59509: Make static constructors + destructors minsize + cold (except for in -O0)

2019-03-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/test/CodeGen/static-attr.cpp:4 + +// WITHOUT-NOT: cold minsize noinline +// WITH: define internal void @__cxx_global_var_init() [[ATTR:#[0-9]]] This is fragile, it may have false-negative if they appear in other

[PATCH] D57645: [C++2a] Fix PR40576: Turn destroying delete off prior to C++2a. Add -fdestroying-delete

2019-03-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF abandoned this revision. EricWF added a comment. Herald added a subscriber: jdoerfert. This is the wrong approach. Abandoning. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57645/new/ https://reviews.llvm.org/D57645 _

[PATCH] D59455: Thread safety analysis: Add note for unlock kind mismatch

2019-03-18 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: include/clang/Analysis/Analyses/ThreadSafety.h:127 + SourceLocation LocLocked, SourceLocation Loc) {} aaron.ballman wrote: > Can yo

[PATCH] D59509: Make static constructors + destructors minsize + cold (except for in -O0)

2019-03-18 Thread Jessica Paquette via Phabricator via cfe-commits
paquette created this revision. paquette added reviewers: rsmith, jyknight. Herald added a project: clang. Since these are only ever run once, they can be marked as cold. On top of that, since they're only ever run once, they might as well be minsize. I observed a 0.21% code size improvement in

[PATCH] D54978: Move the SMT API to LLVM

2019-03-18 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Hi all, I just updated the CMake script to get the version by parsing the header, however, I just found a potential issue in the previous approach: if we have incompatible libs in the path (32-bits libs when compiling in 64-bit mode) the CMake config will succe

[PATCH] D54978: Move the SMT API to LLVM

2019-03-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: llvm/cmake/modules/FindZ3.cmake:92 + + set(Z3_VERSION_STRING ${Z3_MAJOR}.${Z3_MINOR}.${Z3_MAJOR}) + unset(z3_version_str) Should be ${Z3_MAJOR}.${Z3_MINOR}.${Z3_BUILD_NUMBER} CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D54978: Move the SMT API to LLVM

2019-03-18 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 191152. mikhail.ramalho added a comment. Updated script to parse Z3's headers and changed the workflow to handle cross compilation cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54978/new/ https://reviews.llvm.org/D54978 Files: cla

[PATCH] D59455: Thread safety analysis: Add note for unlock kind mismatch

2019-03-18 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 aside from a small nit. Comment at: include/clang/Analysis/Analyses/ThreadSafety.h:127 + SourceLocation LocLocked,

[PATCH] D59448: [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Shouldn't the definition in BuiltinsWebAssembly.def be updated to include an 'I' in the type string so that this will be properly diagnosed in the frontend? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59448/new/ https://reviews.ll

[PATCH] D59448: [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added a comment. This revision is now accepted and ready to land. LGTM; I wonder if it makes sense to have predefined macro for the C++ tag (or perhaps just a regular macro for use in libcxxabi?) Repository: rC Clang CHANGES SINCE LAST ACTION https:/

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-03-18 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Sorry, forgot to re-ping this in a timely manner. :) The discussion on mailing list concluded positively, so waiting for an LG here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58548/new/ https://reviews.llvm.org/D58548

[PATCH] D59346: [X86] Add gcc rotate intrinsics to ia32intrin.h

2019-03-18 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added a comment. Looks good. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59346/new/ https://reviews.llvm.org/D59346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread Don Hinton via cfe-commits
Hi John: I found this investigating the cast assert noted here: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061685.html I subsequently did quick grep and found a number of cases in clang+llvm (didn't find any in other projects) . I'm happy to fix these in mass, i.e., s/cast/dyn_cast/, but

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356397: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D58797?vs=190549&id=191142#toc Repository: rC Cl

r356397 - [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-18 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Mar 18 12:23:45 2019 New Revision: 356397 URL: http://llvm.org/viewvc/llvm-project?rev=356397&view=rev Log: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics These diagnose overflowing calls to subset of fortifiable functions. Some functions, like sprintf or strcpy

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread John McCall via cfe-commits
On 18 Mar 2019, at 14:39, Don Hinton wrote: It looks like this change introduced a small bug; Specifically, the following cast test: - if (auto PT = dyn_cast(DestTy)) { ... + // If we're producing a pointer, this is easy. + if (auto destPtrTy = cast(destTy)) { Since the cast can fail, s

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

2019-03-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/utils/creduce-clang-crash.py:106-117 + # Check that an empty file is not interesting + # file_to_reduce is hardcoded into the test, so this is a roundabout + # way to run it on an empty file + _, tmpfile = tempfile.mkstemp() + _,

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

2019-03-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington requested review of this revision. erik.pilkington added a comment. In D59394#1430221 , @ldionne wrote: > I can confirm this fixed my original problem. It's also close to the patch I > attempted writing myself earlier this week -- but this

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread Don Hinton via cfe-commits
It looks like this change introduced a small bug; Specifically, the following cast test: - if (auto PT = dyn_cast(DestTy)) { ... + // If we're producing a pointer, this is easy. + if (auto destPtrTy = cast(destTy)) { Since the cast can fail, shouldn't you prefer dyn_cast<>(), which can re

r356388 - [OPENMP] Set scheduling for doacross loops as schedule, 1.

2019-03-18 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Mar 18 11:40:00 2019 New Revision: 356388 URL: http://llvm.org/viewvc/llvm-project?rev=356388&view=rev Log: [OPENMP] Set scheduling for doacross loops as schedule, 1. The default scheduling for doacross loops is changed from static to static, 1. Modified: cfe/trunk/

[PATCH] D58160: MS ABI: adding template static member in the linker directive section to make sure init function can be called before main.

2019-03-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/CodeGen/CGDeclCXX.cpp:484 AddGlobalCtor(Fn, 65535, COMDATKey); +if (getTarget().getCXXABI().isMicrosoft()) { + // In The MS C++, MS add template

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

2019-03-18 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. OpenCL C++ part looks good. Thanks! 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_V

r356385 - [AMDGPU] Add the missing clang change of the experimental buffer fat pointer

2019-03-18 Thread Michael Liao via cfe-commits
Author: hliao Date: Mon Mar 18 11:11:37 2019 New Revision: 356385 URL: http://llvm.org/viewvc/llvm-project?rev=356385&view=rev Log: [AMDGPU] Add the missing clang change of the experimental buffer fat pointer Modified: cfe/trunk/lib/Basic/Targets/AMDGPU.cpp cfe/trunk/test/CodeGen/target-d

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

2019-03-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 191128. akhuang added a comment. fix some typos 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] D58160: MS ABI: adding template static member in the linker directive section to make sure init function can be called before main.

2019-03-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Apparently I wrote this comment long ago and never hit send. Comment at: lib/CodeGen/CGDeclCXX.cpp:484 AddGlobalCtor(Fn, 65535, COMDATKey); +if (getTarget().getCXXABI().isMicrosoft()) { + // In The MS C++, MS add template static data member in

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-03-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Could you provide a little bit more comments what are you doing in this patch? It would be good t have a detailed description of the codegen scheme. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2390 } + case OMPRTL__tgt_target_data_mapper: { +//

[PATCH] D59494: AMDGPU: Add support for cross address space synchronization scopes

2019-03-18 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7973 + if (Ordering != llvm::AtomicOrdering::SequentiallyConsistent) { +if (Scope != SyncScope::OpenCLAllSVMDevices) + Name = Twine(Twine(Name) + Twine("-")).str(); if (!Name.empty()

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

2019-03-18 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 191115. Tyker added a comment. i think we are suppose to hook likely/unlikely on builtin_expected, for if, for, while, switch. but i have no idea how we could hook it if we need to support catch. i added a revision with likely/unlikely and the correct semanti

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

2019-03-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked 2 inline comments as done. ioeric added inline comments. Comment at: lib/Tooling/Core/Lookup.cpp:165 +if (UnspelledScopes.empty()) { + Disambiguated = "::" + Disambiguated; +} else { kadircet wrote: > maybe return or break afterwards? I

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. The OpenMP part looks good. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59214/new/ https://reviews.llvm.org/D59214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2019-03-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 191105. dexonsmith added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59388/new/ https://reviews.llvm.org/D59388 Files: clang-tools-extra/clang-move/ClangMove.cpp clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-e

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

2019-03-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Tooling/Core/Lookup.cpp:165 +if (UnspelledScopes.empty()) { + Disambiguated = "::" + Disambiguated; +} else { maybe ret

[PATCH] D59377: Frontend: Remove CompilerInstance::VirtualFileSystem, NFC

2019-03-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D59377#1431203 , @jkorous wrote: > In D59377#1430002 , @dexonsmith > wrote: > > > ... since I noticed that FileManager ... > > > This kind of implies that we should move the comment f

[PATCH] D59377: Frontend: Remove CompilerInstance::VirtualFileSystem, NFC

2019-03-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 191104. dexonsmith added a comment. Document the default VFS used by the `FileManager`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59377/new/ https://reviews.llvm.org/D59377 Files: clang-tools-extra/clangd/Compiler.cpp clang/include/clang

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

2019-03-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: test/Driver/include-default-header.cl:2 +// RUN: %clang -save-temps -x cl -Xclang -cl-std=CL2.0 -Xclang -finclude-default-header -emit-llvm -S -### %s 2>&1 | FileCheck %s +// RUN: %clang -sa

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

2019-03-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D59388#1431314 , @jkorous wrote: > Hi Duncan, thanks for working on better interfaces in clang! > > I am just wondering - is it safe to have the lifetime of a single object on > heap managed by two different `IntrusiveRefCnt

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

2019-03-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 191100. Anastasia added a comment. Moved testing of default header in C++ mode to test/Headers/opencl-c-header.cl CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59486/new/ https://reviews.llvm.org/D59486 Files: test/Driver/include-default-header

[PATCH] D59493: [OpenCL] Generate 'unroll.enable' metadata for __attribute__((opencl_unroll_hint))

2019-03-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. PS, I am just saying that I guess leaving this to the compiler is more helpful than explicitly requiring the full unroll. However, spec contradicts itself by first mentioning the full unroll and then stating that compiler will determines the unrolling factor. Reposi

[PATCH] D54978: Move the SMT API to LLVM

2019-03-18 Thread Dan Liew via Phabricator via cfe-commits
delcypher added a comment. In D54978#1432178 , @ddcc wrote: > In D54978#1431935 , @delcypher wrote: > > > Would one of you be able to file a bug against Z3 to fix this? I am no > > longer in a position to contribut

[PATCH] D59493: [OpenCL] Generate 'unroll.enable' metadata for __attribute__((opencl_unroll_hint))

2019-03-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! The wording in spec is confusing btw because it says: > This attribute qualifier can be used to specify full unrolling or partial > unrolling by a specified amount. May b

  1   2   >