[PATCH] D59287: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode.

2019-03-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356118: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode. (authored by ctopper, committed by ). Changed prior to commit: https://reviews.llvm.org/D59287?vs=190376&id=190571#toc Rep

r356118 - [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode.

2019-03-13 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Mar 13 22:45:42 2019 New Revision: 356118 URL: http://llvm.org/viewvc/llvm-project?rev=356118&view=rev Log: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode. Summary: This define should correspond to CMPXCHG16B being available which requires 64-bit m

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-03-13 Thread Aaron Smith via Phabricator via cfe-commits
asmith created this revision. asmith added reviewers: rnk, zturner, dblaikie, probinson. Herald added subscribers: cfe-commits, jdoerfert, aprantl. Herald added a project: clang. These flags are used when emitting debug info and needed to initialize subprogram and member function attributes (func

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

2019-03-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 190568. craig.topper added a comment. Fix bad comment copy/paste Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59346/new/ https://reviews.llvm.org/D59346 Files: lib/Headers/ia32intrin.h test/CodeGen/rot-intrinsics.c

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

2019-03-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 190567. craig.topper added a comment. Add the test file Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59346/new/ https://reviews.llvm.org/D59346 Files: lib/Headers/ia32intrin.h test/CodeGen/rot-intrinsics.c Index:

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

2019-03-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: rnk, jyknight, RKSimon, spatel, erichkeane. Herald added a subscriber: jdoerfert. Herald added a project: clang. craig.topper updated this revision to Diff 190567. craig.topper added a comment. Add the test file This is another at

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-03-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54 + std::seed_seq Seq; + std::default_random_engine rng; +}; timpugh wrote: > connorkuehl wrote: > > pcc wrote: > > > I don't think we can use `default_random_

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-03-13 Thread Tim Pugh via Phabricator via cfe-commits
timpugh added inline comments. Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54 + std::seed_seq Seq; + std::default_random_engine rng; +}; connorkuehl wrote: > pcc wrote: > > I don't think we can use `default_random_engine` for this because the

[PATCH] D56990: Bugfix for Replacement of tied operand of inline asm

2019-03-13 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D56990#1426977 , @efriedma wrote: > LGTM; I'll merge it tonight or tomorrow. Thank you very much! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56990/new/ https://reviews.llvm.org/D569

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2019-03-13 Thread Andy Zhang via Phabricator via cfe-commits
axzhang updated this revision to Diff 190559. axzhang added a comment. Apologies for the extended hiatus. I have changed the implementation to an alias to modernize-make-unique, and have added an extra option to modernize-make-unique that ignores C++11 features such as list initializations, to

[PATCH] D59123: [analyzer] RetainCount: Fix a crash when a function follows retain/autorelease naming convention but takes no arguments.

2019-03-13 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Sigh. Looks good! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59123/new/ https://reviews.llvm.org/D59123 ___

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

2019-03-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I remember this coming up 7-8 years ago. I intentionally decided against doing a copy/release when assigning to `__weak` because if the block wasn't already guaranteed to be copied then it was probably better to crash than to silently assign a value that's about to be

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-03-13 Thread Ryan Piantedosi via Phabricator via cfe-commits
Dosi-Dough updated this revision to Diff 190552. Dosi-Dough marked 11 inline comments as done. Dosi-Dough added a comment. Herald added a subscriber: jdoerfert. Herald added a project: clang. added style and performance refactoring based on code reviews Repository: rCTE Clang Tools Extra CHAN

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

2019-03-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 190549. erik.pilkington marked 16 inline comments as done. erik.pilkington added a comment. Address review comments. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58797/new/ https://reviews.llvm.org/D58797 Files: clang/include/cla

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

2019-03-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:319 +// If the parameter has a pass_object_size attribute, then we should use +// it's (potentially) more strict checking mode. Otherwise, conservatively +// assume type 0.

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

2019-03-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Do you mean copying the block to the heap before assigning it to `wb` and releasing it after the assignment inside `bar`? Wouldn't the block assigned to `wb` be deallocated after the release? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org

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

2019-03-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D58514#1428567 , @ahatanak wrote: > Sorry, I misread the code. If you change the parameter type of `bar` to > `BlockTy`, the code crashes. If the type is `id`, it doesn't crash because > IRGen copies the block to the heap i

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

2019-03-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Sorry, I misread the code. If you change the parameter type of `bar` to `BlockTy`, the code crashes. If the type is `id`, it doesn't crash because IRGen copies the block to the heap in `foo` before passing it to `bar`. Repository: rC Clang CHANGES SINCE LAST ACTION

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

2019-03-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 2 inline comments as done. stephanemoore added a comment. Thanks for the review! Comment at: clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp:57 // Find all TypeLocs. The relevant Style Guide rule only applies to C++. - if (!getLangOpts().CPlus

[PATCH] D59304: Fix invocation of Gold plugin with LTO after r355331

2019-03-13 Thread Nemanja Ivanovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356111: Fix invocation of Gold plugin with LTO after r355331 (authored by nemanjai, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:

r356111 - Fix invocation of Gold plugin with LTO after r355331

2019-03-13 Thread Nemanja Ivanovic via cfe-commits
Author: nemanjai Date: Wed Mar 13 16:54:52 2019 New Revision: 356111 URL: http://llvm.org/viewvc/llvm-project?rev=356111&view=rev Log: Fix invocation of Gold plugin with LTO after r355331 The above commit breaks the usage of PGO and LTO when -fprofile-use is supplied without a path. This patch ch

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

2019-03-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D58514#1428520 , @ahatanak wrote: > That code doesn't crash because the block is retained at the entry of `bar` > and ARC optimizer doesn't remove the retain/release pairs in `bar`. Oops, I meant: typedef void (^BlockTy

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

2019-03-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D58514#1428495 , @dexonsmith wrote: > In D58514#1428434 , @ahatanak wrote: > > > Seems like the chromium code is valid and shouldn't crash. John/Erik what > > do you think? The followin

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

2019-03-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D58514#1428434 , @ahatanak wrote: > Seems like the chromium code is valid and shouldn't crash. John/Erik what do > you think? The following code also crashes with this patch applied. > > typedef void (^BlockTy)(); > >

[PATCH] D59223: Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations

2019-03-13 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 190534. thakis edited the summary of this revision. thakis added a comment. extension CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59223/new/ https://reviews.llvm.org/D59223 Files: clang/include/clang/Basic/Features.def clang/lib/Parse/ParseDec

[PATCH] D59223: Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations

2019-03-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Ah, got it, thanks for explaining! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59223/new/ https://reviews.llvm.org/D59223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-13 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:447 const char *crtbegin; - if (Args.hasArg(options::OPT_static)) -crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o"; - else if (Args.hasArg(options::OPT_shared)) -

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

2019-03-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Seems like the chromium code is valid and shouldn't crash. John/Erik what do you think? The following code also crashes with this patch applied. typedef void (^BlockTy)(); BlockTy sb; __weak BlockTy wb; void foo(id a) { auto b = ^{ NSLog(@"foo %@", a);

[PATCH] D59223: Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations

2019-03-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/Features.def:121 FEATURE(objc_class_property, LangOpts.ObjC) +FEATURE(objc_c_static_assert, true) +FEATURE(objc_cxx_static_assert, LangOpts.CPlusPlus11) thakis wrote: > erik.pilkington

[PATCH] D59223: Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations

2019-03-13 Thread Nico Weber via Phabricator via cfe-commits
thakis marked an inline comment as done. thakis added inline comments. Comment at: clang/include/clang/Basic/Features.def:121 FEATURE(objc_class_property, LangOpts.ObjC) +FEATURE(objc_c_static_assert, true) +FEATURE(objc_cxx_static_assert, LangOpts.CPlusPlus11)

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

2019-03-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added inline comments. Comment at: clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp:57 // Find all TypeLocs. The relevant Style Guide rule only applies to C++. - if (!getLangOpts().CPlusPlus) + // This check is a

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

2019-03-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp:57 // Find all TypeLocs. The relevant Style Guide rule only applies to C++. - if (!getLang

LLVM buildmaster will be updated and restarted tonight

2019-03-13 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 7PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D59223: Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations

2019-03-13 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 190521. thakis added a comment. c89 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59223/new/ https://reviews.llvm.org/D59223 Files: clang/include/clang/Basic/Features.def clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/ParseObjc.cpp clang/lib/

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

2019-03-13 Thread Stephane Moore via cfe-commits
I was uncertain whether or not this change required new tests. A previous change which disabled this check in languages other than C++ did not include additional tests: https://github.com/llvm/llvm-project/commit/ec3e5d6fd87862eb77a2b0320d79b9a4427d39df#diff-a491be84e1b831aeaea56c39b5eb898c If the

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

2019-03-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Let me know if you think this change would benefit from added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59336/new/ https://reviews.llvm.org/D59336 ___ cfe-comm

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

2019-03-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 190520. stephanemoore added a comment. Document change in release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59336/new/ https://reviews.llvm.org/D59336 Files: clang-tools-extra/clang-tidy/goo

Re: r354843 - [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial

2019-03-13 Thread Reid Kleckner via cfe-commits
Aaron, I've followed both links you point to to answer the questions being asked, and to me they don't seem to contain obvious answers. I understand that repeatedly answering the same question over and over again is tedious and we are all busy, but please remind us why both DIFlagTrivial and DIFlag

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

2019-03-13 Thread Roman Lebedev via cfe-commits
test? On Thu, Mar 14, 2019 at 1:17 AM Stephane Moore via Phabricator via cfe-commits wrote: > > stephanemoore created this revision. > Herald added subscribers: cfe-commits, jdoerfert, xazax.hun. > Herald added a project: clang. > > In contrast to Google C++, Objective-C often uses built-in integ

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

2019-03-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: cfe-commits, jdoerfert, xazax.hun. Herald added a project: clang. In contrast to Google C++, Objective-C often uses built-in integer types other than `int`. In fact, the Objective-C runtime itself defines the types NSInteger¹ and NSUIn

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/Parse/ParseAST.cpp:172 + { +llvm::TimeTraceScope scope("Backend", ""); +Consumer->HandleTranslationUnit(S.getASTContext()); I think you may want to move this to `clang::EmitBackendOutput`, which is closer

[PATCH] D55895: NFC: simplify Darwin environment handling

2019-03-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Herald added a project: clang. In D55895#1336777 , @arphaman wrote: > I think we might need to run it past the internal builds to see if anything > breaks. We've been running it for a while without breakage. Good to go? Repository

[PATCH] D57893: [analyzer] Fix function macro crash

2019-03-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Ah so it was a past-the-end iterator dereference error. Cheers! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57893/new/ https://reviews.llvm.org/D57893

[PATCH] D57918: Add an attribute that causes clang to emit fortified calls to C stdlib functions

2019-03-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a subscriber: jyknight. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. Herald added a subscriber: jdoerfert. I reverted this in r356103: Revert "Add a new attribute, fortify_stdlib" This reverts commit r353765. After talking with ou

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 5 inline comments as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// ABataev wrote: > All exported functions are declared in the

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Very cool! I'll take a look, I wasn't aware this had been rebased and uploaded, I was thinking about doing it myself yesterday as a side project. As I think I've said elsewhere, I'm really excited to give users the tools they need to analyze why their code compiles slowly.

r356103 - Revert "Add a new attribute, fortify_stdlib"

2019-03-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Mar 13 14:37:01 2019 New Revision: 356103 URL: http://llvm.org/viewvc/llvm-project?rev=356103&view=rev Log: Revert "Add a new attribute, fortify_stdlib" This reverts commit r353765. After talking with our c stdlib folks, we decided to use the existing pass_object_size attr

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-13 Thread Zachary Turner via Phabricator via cfe-commits
zturner added reviewers: rnk, hans. zturner added a comment. +reid and hans, as they might be interested in this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58675/new/ https://reviews.llvm.org/D58675 ___ cfe-commits mailing list cfe-comm

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek marked an inline comment as done. phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:447 const char *crtbegin; - if (Args.hasArg(options::OPT_static)) -crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o"; - else if

[PATCH] D57460: [OpenMP][Offloading] A generic and simple OpenMP target kernel interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. Patch was split, new revisions can be found here: OpenMP: https://reviews.llvm.org/D59319 Clang: https://reviews.llvm.org/D59328 LLVM: https://reviews.llvm.org/D59331 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D59223: Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations

2019-03-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, after one more comment in Features.def :) Comment at: clang/include/clang/Basic/Features.def:121 FEATURE(objc_class_property, LangOpts.ObjC) +FEATURE

[PATCH] D59287: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode.

2019-03-13 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. I agree that its not great, but I don't think we're going to do much better - and matching gcc behaviours does make sense here. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59287/new/ https://reviews.llvm.org/D59287 _

[PATCH] D59332: [clang-format] AlignConsecutiveDeclarations fails with attributes

2019-03-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: rolandschulz, reuk, djasper, klimek. MyDeveloperDay added a project: clang-tools-extra. Addresses http://llvm.org/PR40418 When using `AlignConsecutiveDeclarations: true` variables with Attributes would not be aligned correctly

[PATCH] D59287: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode.

2019-03-13 Thread JF Bastien via Phabricator via cfe-commits
jfb accepted this revision. jfb added a comment. This revision is now accepted and ready to land. OK, that seems unfortunate but unlikely and consistency terrible with GCC. Let's do it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59287/new/ https://reviews.llv

r356099 - [clang-format] Propagate inferred language to getLLVMStyle() in getPredefinedStyle()

2019-03-13 Thread Jordan Rupprecht via cfe-commits
Author: rupprecht Date: Wed Mar 13 14:13:01 2019 New Revision: 356099 URL: http://llvm.org/viewvc/llvm-project?rev=356099&view=rev Log: [clang-format] Propagate inferred language to getLLVMStyle() in getPredefinedStyle() rC355158 added an optional language parameter to getLLVMStyle(), but this

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-13 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @rsmith Any suggestions for good reviewers for this please? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58675/new/ https://reviews.llvm.org/D58675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D59287: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode.

2019-03-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I think the only error we have for X86 is trying to use a -march for a cpu that only supports 32 bit but compiling 64 bit code. I dont' think we can error for -mcx16 on a 32-bit target. For -march=native, the driver will call getHostCPUFeatures and get a list of fe

[PATCH] D59328: [OpenMP][Offloading][2/3] Codegen for target regions (TRegions)

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added a project: OpenMP. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. Herald added a project: clang. The commit includes the Clang code generation for OpenMP target constructs based on the interface target region (TRegion)

[PATCH] D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.

2019-03-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. ymandel added a project: clang. Herald added subscribers: jfb, mgorny. The standard matcher API uses StringRefs to identify bound nodes. This patch introduces a strong type thats allows distinguishing ids from arbitrary text

[PATCH] D59327: [Sema] Fix a use-after-free of a _Nonnull ParsedAttr

2019-03-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, arphaman, rsmith. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. We were allocating the implicit attribute in the declarator's attribute pool, but putting into the declaration spe

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-13 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added subscribers: manojgupta, llozano. manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:447 const char *crtbegin; - if (Args.hasArg(options::OPT_static)) -crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o";

[PATCH] D59307: Patch llvm bug 41033 concerning atomicity of statement expressions

2019-03-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59307#1428101 , @mibintc wrote: > In D59307#1427644 , @jfb wrote: > > > I think you also want to test C++ `std::atomic` ... > > > The bug described in https://bugs.llvm.org/show_bug.cgi?id=4

r356098 - [OPENMP]Fix PR37283: Assertion failure on openmp task with by reference

2019-03-13 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Mar 13 13:46:28 2019 New Revision: 356098 URL: http://llvm.org/viewvc/llvm-project?rev=356098&view=rev Log: [OPENMP]Fix PR37283: Assertion failure on openmp task with by reference array. If the firstprivate variable is a reference, we may incorrectly classify the kind of

[PATCH] D59307: Patch llvm bug 41033 concerning atomicity of statement expressions

2019-03-13 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D59307#1427644 , @jfb wrote: > I think you also want to test C++ `std::atomic` ... The bug described in https://bugs.llvm.org/show_bug.cgi?id=41033 doesn't occur using C++ atomic, I rewrote the test case this way, and it comp

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake:81 # if any of them are not supported, there is no point in finding out which are. -set(compiler_flags_required -emit-llvm -O1 --cuda-device-only --cuda-path=${CU

[PATCH] D59287: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode.

2019-03-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59287#1427945 , @craig.topper wrote: > Is this ok with the backend fixed? This is definitely better. > Or do you want me factor this into HasCX16 which I think is only used by the > defineMacro and the return for hasFeature("c

r356097 - [clang-format][NFC] Include TableGen in enum->string mapping used for debugging

2019-03-13 Thread Jordan Rupprecht via cfe-commits
Author: rupprecht Date: Wed Mar 13 13:34:34 2019 New Revision: 356097 URL: http://llvm.org/viewvc/llvm-project?rev=356097&view=rev Log: [clang-format][NFC] Include TableGen in enum->string mapping used for debugging Running `clang-format -debug` prints "Unknown" for tablegen files because of thi

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D59316#1427996 , @ashi1 wrote: > Hi Matt, that solution will need refactoring and testing. Currently, > HIP-Clang is following the same link flow as HCC HCC is also an issue. I really want effort put into fixing this rather th

[PATCH] D59321: WIP: AMDGPU: Teach toolchain to link rocm device libs

2019-03-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, ashi1. Herald added subscribers: jdoerfert, t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely, kzhuravl. This is pending finalization of what the device library build path/names are. I'm also not sure if some of the standard default libr

[PATCH] D57893: [analyzer] Fix function macro crash

2019-03-13 Thread Tibor Brunner via Phabricator via cfe-commits
bruntib updated this revision to Diff 190485. bruntib added a comment. I added a condition before std::next() invocations to check if the next element is inside the valid interval. This fixes the crash of the build-bot. Sorry for the ugly bug. I don't know if there is a more elegant solution.

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190484. jdoerfert added a comment. Simplify the commmit further Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files: openmp/libomptarget/deviceRTLs/common/target_

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. Herald added a project: OpenMP. This patch introduces an alternative OpenMP GPU kernel offloading interface called target kernel region (or TRegion). The commit includes the runtime libr

[PATCH] D59318: Add an overload for ClangTidy's diag method that allows users to provide a diagnostic name rather than using the check name when building a diagnostic.

2019-03-13 Thread Harshal Lehri via Phabricator via cfe-commits
htl created this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D59318 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidy.h Index: clang-tools-extra/clang-tidy/ClangTidy.h ===

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

2019-03-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Hi ahatanak, this causes a crash in chrome/ios. A reduced repro is at https://bugs.chromium.org/p/chromium/issues/detail?id=941680 . Is the code invalid, or is that a bug in the transform? Thanks, Nico Repository: rC Clang CHANGES SINCE LAST ACTION https://review

RE: r354843 - [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial

2019-03-13 Thread via cfe-commits
Hi Aaron, The additional tests tell me that every composite type is either Trivial or NonTrivial, which does not answer the question: Why do you need two flags? DIFlags are not a plentiful resource and we should be reluctant to use them up. Thanks, --paulr From: Aaron Smith [mailto:aaron.sm...@m

Re: r354843 - [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial

2019-03-13 Thread Aaron Smith via cfe-commits
Hi Paul, There are additional tests here that may answer your questions, https://reviews.llvm.org/rGe8475f78e2634d5d348d7ad746efc1e6526e72f5 Aaron From: "paul.robin...@sony.com" Date: Wednesday, March 13, 2019 at 12:49 PM To: Aaron Smith , "dblai...@gmail.com" , "r...@google.com" , "apra...@ap

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-13 Thread Aaron Enye Shi via Phabricator via cfe-commits
ashi1 added a comment. Hi Matt, that solution will need refactoring and testing. Currently, HIP-Clang is following the same link flow as HCC Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59316/new/ https://reviews.llvm.org/D59316 _

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. The real solution is to stop invoking these tools separately. clang -cc1 should be used for everything Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59316/new/ https://reviews.llvm.org/D59316 ___

RE: r354843 - [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial

2019-03-13 Thread via cfe-commits
Hi Aaron, I think I am less clever than David, and it's not clear what the difference is between the two flags. In the review, Zach asked the question but I did not see a straight answer. What do these flags actually mean? What is the third state, with both flags off, implying not Trivial and no

[PATCH] D58556: [LibTooling] Add retrieval of extended AST-node source to FixIt library

2019-03-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356095: [LibTooling] Add retrieval of extended AST-node source to FixIt library (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior t

r356095 - [LibTooling] Add retrieval of extended AST-node source to FixIt library

2019-03-13 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Mar 13 12:48:51 2019 New Revision: 356095 URL: http://llvm.org/viewvc/llvm-project?rev=356095&view=rev Log: [LibTooling] Add retrieval of extended AST-node source to FixIt library Summary: Introduces variants of `getText` and `getSourceRange` that extract the source tex

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-13 Thread Aaron Enye Shi via Phabricator via cfe-commits
ashi1 created this revision. ashi1 added a reviewer: yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. I've updated the HIP ToolChain to pass OPT_mllvm options into OPT and LLC stages. Also added a lit test to verify its properly passed down. All check-clang tests p

[PATCH] D59048: Add AIX Target Info

2019-03-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: test/Headers/max_align.c:1 +// RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics lebedev.ri wrote: > hubert.reinterpretcast wrote: > > We may need to explicitly specify C11. It also seem

[PATCH] D59287: [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode.

2019-03-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Is this ok with the backend fixed? Or do you want me factor this into HasCX16 which I think is only used by the defineMacro and the return for hasFeature("cx16")? And I think hasFeature("cx16") is only used by that getMaxAtomicWidth() code which is only called on 6

r356089 - [OPENMP]Disable ADL in C for user-defined reductions.

2019-03-13 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Mar 13 12:31:34 2019 New Revision: 356089 URL: http://llvm.org/viewvc/llvm-project?rev=356089&view=rev Log: [OPENMP]Disable ADL in C for user-defined reductions. C does not support ADL, disable it for C to prevent compiler crash. Modified: cfe/trunk/lib/Sema/SemaOpe

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 190472. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

r356088 - [Analyzer] Clean up test/Analysis/ptr-sort.cpp

2019-03-13 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Wed Mar 13 12:21:11 2019 New Revision: 356088 URL: http://llvm.org/viewvc/llvm-project?rev=356088&view=rev Log: [Analyzer] Clean up test/Analysis/ptr-sort.cpp Modified: cfe/trunk/test/Analysis/ptr-sort.cpp Modified: cfe/trunk/test/Analysis/ptr-sort.cpp URL: http://llvm.

r356087 - Fix a failing test.

2019-03-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Mar 13 12:20:45 2019 New Revision: 356087 URL: http://llvm.org/viewvc/llvm-project?rev=356087&view=rev Log: Fix a failing test. Modified: cfe/trunk/test/Parser/pragma-attribute-context.cpp Modified: cfe/trunk/test/Parser/pragma-attribute-context.cpp URL: http://llvm.

[PATCH] D59048: Add AIX Target Info

2019-03-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/Headers/max_align.c:1 +// RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics hubert.reinterpretcast wrote: > We may need to explicitly specify C11. It also seems that we should XFAIL > Windows

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > Could you please add a commit that changes the top of the file on your > previous commit? Feel free to do that without review (I can't commit it > myself atm). Done in https://reviews.llvm.org/rC356086. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/

[PATCH] D59048: Add AIX Target Info

2019-03-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: test/Headers/max_align.c:1 +// RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics We may need to explicitly specify C11. It also seems that we should XFAIL Windows targets. Repository:

r356086 - [Analyzer] Update the LLVM license in PointerSortingChecker.cpp

2019-03-13 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Wed Mar 13 12:09:48 2019 New Revision: 356086 URL: http://llvm.org/viewvc/llvm-project?rev=356086&view=rev Log: [Analyzer] Update the LLVM license in PointerSortingChecker.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp Modified: cfe/trunk/l

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Could you please add a commit that changes the top of the file on your previous commit? Feel free to do that without review (I can't commit it myself atm). In D59279#1427803 , @mgrang wrote: > Also, what is the difference betwe

[PATCH] D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files.

2019-03-13 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 190462. Wizard added a comment. fix ObjC++ test Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59283/new/ https://reviews.llvm.org/D59283 Files: clang-tidy/google/GlobalVariableDeclarationCheck.cpp test/clang

[PATCH] D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files.

2019-03-13 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 190461. Wizard added a comment. Resolve comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59283/new/ https://reviews.llvm.org/D59283 Files: clang-tidy/google/GlobalVariableDeclarationCheck.cpp test/clan

[PATCH] D59307: Patch llvm bug 41033 concerning atomicity of statement expressions

2019-03-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. This is my concern here: https://godbolt.org/z/icS4fa The patch will change template instantiation. GCC doesn't seem to allow using _Atomic in C++ mode, which is perhaps a necessary part of this solution? I see we already consider overload sets with int and _Atomic

[PATCH] D59282: [Parse] Parse '#pragma clang attribute' as an external-declaration

2019-03-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356075: [Parse] Parse '#pragma clang attribute' as an external-declaration (authored by epilk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commi

r356075 - [Parse] Parse '#pragma clang attribute' as an external-declaration

2019-03-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Mar 13 11:30:59 2019 New Revision: 356075 URL: http://llvm.org/viewvc/llvm-project?rev=356075&view=rev Log: [Parse] Parse '#pragma clang attribute' as an external-declaration Previously, we parsed it only in the top level, which excludes namespaces and extern "C" blocks.

[PATCH] D59307: Patch llvm bug 41033 concerning atomicity of statement expressions

2019-03-13 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D59307#1427663 , @jfb wrote: > Thinking some more, this is really a silly gotcha in code. We should probably > follow what we're about to do with wg21.link/P1152 > and ban chaining. Statement e

[PATCH] D59307: Patch llvm bug 41033 concerning atomicity of statement expressions

2019-03-13 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D59307#1427665 , @jfb wrote: > From an offline discussion, I'm told that @jwakely uses this in GCC headers > and expects some semantics from it? Jonathan, why?!?! Yes this is how I stumbled into the issue. Repository: rC

  1   2   3   >