[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-12 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 256931. plotfi added a comment. Move ObjCPropertyAttributeKind to namespace ObjCPropertyAttribute { enum Kind { ... }} Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77233/new/ https://reviews.llvm.org/D77233 F

[PATCH] D77728: [Driver][X86] Add an alias for -mpad-max-prefix-size

2020-04-12 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. After careful consideration, I agree with @MaskRay ’s point of view that this alias is incorrect since they do different things. If there is no objection, I plan to abandon this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D78000: [ASTImporter] Fix handling of not defined FromRecord in ImportContext(...)

2020-04-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. I am open to different approaches to this problem, this is opening attempt at fixing it but I may be missing other interactions. AFAICT starting the definition of `ToRecord` the way `CompleteDecl(…)` does when we know `FromRecord` is not defined is just broken for the

[PATCH] D78000: [ASTImporter] Fix handling of not defined FromRecord in ImportContext(...)

2020-04-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: martong, balazske, teemperor, a_sidorin. Herald added a subscriber: rnkovacs. Herald added a reviewer: a.sidorin. shafik added a comment. I am open to different approaches to this problem, this is opening attempt at fixing it but I may be miss

[clang] 8dda0f9 - Remove dependency between test files.

2020-04-12 Thread Alexander Kornienko via cfe-commits
Author: Alexander Kornienko Date: 2020-04-13T06:19:09+02:00 New Revision: 8dda0f91995955bb8f484f8d41374aff59118355 URL: https://github.com/llvm/llvm-project/commit/8dda0f91995955bb8f484f8d41374aff59118355 DIFF: https://github.com/llvm/llvm-project/commit/8dda0f91995955bb8f484f8d41374aff59118355

[PATCH] D77954: [CUDA][HIP] Fix host/device based overload resolution

2020-04-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:9481 + // emitted, Cand1 is not better than Cand2. This rule should have precedence + // over other rules. + // Please add `[CUDA]` or something similar to the top of this comment so t

[PATCH] D77743: [HIP] Emit symbols with kernel name in host binary

2020-04-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ah, too bad. Is there any way to suppress that in debug info? I'm not sure there's any other way to satisfy the competing requirements here, and if it's not going to be consistent, it'd be better to avoid the complexity of mangling the thunk differently. CHANGES SI

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-12 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: clang/include/clang/AST/DeclObjCCommon.h:21 +/// Keep this list in sync with LLVM's Dwarf.h ApplePropertyAttributes. +enum ObjCPropertyAttributeKind { + OBJC_PR_noattr = 0x00, eri

[PATCH] D77743: [HIP] Emit symbols with kernel name in host binary

2020-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D77743#1975822 , @rjmccall wrote: > Is the renaming just being done to avoid breakpoints from triggering in the > stub? Can you not disable debugging the stub using whatever mechanism > `__attribute__((nodebug))` uses? I tri

[PATCH] D77989: Allow disabling of vectorization using internal options

2020-04-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: fhahn, wmi. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya. Herald added a project: clang. Currently, the internal options -vectorize-loops, -vectorize-slp, and -interleave-loops do not have much practical effect.

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/AST/DeclObjCCommon.h:21 +/// Keep this list in sync with LLVM's Dwarf.h ApplePropertyAttributes. +enum ObjCPropertyAttributeKind { + OBJC_PR_noattr = 0x00, plotfi wrote: > plotfi wrote: > > c

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-12 Thread Ten Tzen via Phabricator via cfe-commits
tentzen added a comment. In D77936#1976984 , @efriedma wrote: > I'm not concerned about the performance implications of whatever approach we > take here. In the worst case, an "icmp+zext" corresponds to two extra > arithmetic instructions; that's not en

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-12 Thread Ten Tzen via Phabricator via cfe-commits
tentzen updated this revision to Diff 256906. tentzen added a comment. Per Eli's suggestion, Use icmp (and zext) to check the JumpDest index, instead of directly passing the Index to _finally(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77936/n

[PATCH] D77954: [CUDA][HIP] Fix host/device based overload resolution

2020-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 256903. yaxunl retitled this revision from "[CUDA][HIP] Fix overload resolution issue for device host functions" to "[CUDA][HIP] Fix host/device based overload resolution". yaxunl added a comment. Revised by John's comments. CHANGES SINCE LAST ACTION http

[PATCH] D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally

2020-04-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Please upload patches with full context (-U100). Comment at: clang/lib/CodeGen/CGException.cpp:1798 + +// if the parent is a _finally, need to retrive Establisher's FP, +// 2nd paramenter, saved & named frame_pointer in parent's frame

[PATCH] D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally

2020-04-12 Thread Ten Tzen via Phabricator via cfe-commits
tentzen updated this revision to Diff 256896. tentzen added a comment. Fixed the format at comment lines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77982/new/ https://reviews.llvm.org/D77982 Files: clang/lib/CodeGen/CGException.cpp clang/li

[PATCH] D77984: Make IRBuilder automatically set alignment on load/store/alloca.

2020-04-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: jdoerfert, lebedev.ri, spatel. Herald added subscribers: cfe-commits, kerbowa, nhaehnle, jvesely. Herald added a reviewer: bollu. Herald added a project: clang. This is equivalent in terms of LLVM IR semantics, but we want to transition aw

[PATCH] D77983: clang-tidy doc: add a note for every checker with an autofix

2020-04-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Herald added a subscriber: wuzish. It'll be reasonable to use two spaces indent. At least this is what mostly used for code blocks. Options are exceptions, but will be good idea to reformat them eventually. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D77908: [WebAssembly] Enable nontrapping-fptoint for `default` cpu

2020-04-12 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I don't have documented plan anywhere. I simply observed that we have CPUs called `mvp` and `generic` and it made sense to start including more things in the generic CPU, leaving the `mvp` option open to those who want to be conservative. I don't think its a huge issue

[PATCH] D77983: clang-tidy doc: add a note for every checker with an autofix

2020-04-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added reviewers: alexfh, aaron.ballman. Herald added subscribers: Charusso, arphaman, kbarton, nemanjai. Herald added a project: clang. Currently, when looking at a checker documentation, we have to go back to the whole list or look at the sou

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-12 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 2 inline comments as done. plotfi added inline comments. Comment at: clang/include/clang/AST/DeclObjCCommon.h:21 +/// Keep this list in sync with LLVM's Dwarf.h ApplePropertyAttributes. +enum ObjCPropertyAttributeKind { + OBJC_PR_noattr = 0x00, plo

[PATCH] D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally

2020-04-12 Thread Ten Tzen via Phabricator via cfe-commits
tentzen created this revision. tentzen added reviewers: rnk, eli.friedman, JosephTremoulet, asmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change fixed a SEH bug (exposed by test58 & test61 in MSVC test xcpt4u.c); when an Except-filter is located inside a final

Re: [clang] 246398e - [clang][Parse] properly parse asm-qualifiers, asm inline

2020-04-12 Thread Joerg Sonnenberger via cfe-commits
On Thu, Mar 12, 2020 at 03:25:49PM -0700, Nick Desaulniers via cfe-commits wrote: > > Author: Nick Desaulniers > Date: 2020-03-12T15:13:59-07:00 > New Revision: 246398ece7115b57a02dbe7876d86ae8e72406ef > > URL: > https://github.com/llvm/llvm-project/commit/246398ece7115b57a02dbe7876d86ae8e72406

[PATCH] D77831: [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)?

2020-04-12 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG672207c319a0: [clang-tidy] Convert config options that are bools to use the bool overload of… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[clang-tools-extra] 672207c - [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)?

2020-04-12 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2020-04-12T23:06:09+01:00 New Revision: 672207c319a06f20dc634bcd21678d5dbbe7a6b9 URL: https://github.com/llvm/llvm-project/commit/672207c319a06f20dc634bcd21678d5dbbe7a6b9 DIFF: https://github.com/llvm/llvm-project/commit/672207c319a06f20dc634bcd21678d5dbbe7a6b9.diff

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I'm not concerned about the performance implications of whatever approach we take here. In the worst case, an "icmp+zext" corresponds to two extra arithmetic instructions; that's not enough to matter. And I expect usually it'll get optimized away. I'd prefer to avoi

[PATCH] D33029: [clang-format] add option for dangling parenthesis

2020-04-12 Thread Bhopesh Bassi via Phabricator via cfe-commits
bbassi added a comment. @MyDeveloperDay hey, I am currently working on this, and adding a new option called BreakBeforeClosingBracket. I have some questions to understand the existing code, they might not be directly linked to this change so I am not sure if this the best place to ask those qu

[PATCH] D77952: [TLII] Reduce copies of TLII for TLA

2020-04-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. lgtm with the VecLibDesc references removed. Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:596 memcpy(AvailableArray, TLI.AvailableArray, sizeof(AvailableArray)); return *this; } wenlei wrote: > tejohnson wrote: > > This

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-12 Thread Ten Tzen via Phabricator via cfe-commits
tentzen added a comment. In D77936#1976938 , @efriedma wrote: > Instead of asserting there are less than 256 cleanup destinations, can you > emit an icmp against zero, or something like that? I did consider that. but it splits the block and induces one

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Instead of asserting there are less than 256 cleanup destinations, can you emit an icmp against zero, or something like that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77936/new/ https://reviews.llvm.org/D77936 ___

[PATCH] D77669: [clangd] Update TUStatus test to handle async PreambleThread

2020-04-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 256875. kadircet marked 6 inline comments as done. kadircet added a comment. - Record actions for each thread separately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77669/new/ https://reviews.llvm.org/D7766

[PATCH] D77669: [clangd] Update TUStatus test to handle async PreambleThread

2020-04-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. going with separately recording each thread. that way we can also test building of diagnostics. Comment at: clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp:849 + auto Opts = ClangdServer::optsForTest(); + Opts.AsyncThreadsCount = 0; + Clang

[PATCH] D77955: [clangd] Add target_info test

2020-04-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet abandoned this revision. kadircet added a comment. landed as 101a69d71b93f901561621508ed36b187e594d91 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77955/new/ https://r

[PATCH] D77979: [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName

2020-04-12 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. mgehre added reviewers: aaron.ballman, alexfh, hokein, njames93. Herald added a subscriber: xazax.hun. Herald added a project: clang. Before this PR, `modernize-use-using` would transform the typedef in template struct InjectedClassName { typedef InjectedCla

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Frontend/noderef.c:211 + +int *implicit_cast(NODEREF int *x) { + return (int *)x; // expected-warning{{casting to dereferenceable pointer removes 'noderef' attribute}} The name of the function is a bit

[PATCH] D77831: [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)?

2020-04-12 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, thanks for the cleanup! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77831/new/ https://reviews.llvm.org/D77831

[PATCH] D69171: [clang-fuzzer] Add new fuzzer target for Objective-C

2020-04-12 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp:19 -extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { return 0; } - @dgoldman @morehouse Removing this has been causing link failures ever since it was c

[PATCH] D77908: [WebAssembly] Enable nontrapping-fptoint for `default` cpu

2020-04-12 Thread Alon Zakai via Phabricator via cfe-commits
kripken added a comment. Is the general plan for LLVM documented somewhere? It's not obvious to me why something being in the wasm spec means it should be enabled by default in LLVM. (It's also not obvious to me that is wrong! I'm just not sure what the reasoning is here.) In particular, somet

[PATCH] D77952: [TLII] Reduce copies of TLII for TLA

2020-04-12 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked 2 inline comments as done. wenlei added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:689 // Set up the per-function pass manager. - FPM.add(new TargetLibraryInfoWrapperPass(*TLII)); + FPM.add(new TargetLibraryInfoWrapperPass(TargetTriple));

[PATCH] D77952: [TLII] Reduce copies of TLII for TLA

2020-04-12 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77952#1976803 , @tejohnson wrote: > Also, just a nit, because TLI is sometimes used to refer to the > TargetLibraryInfo and occasionally to the TargetLibraryInfoImpl, and the > latter is frequently referred to as TLII, could y

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Also, just a nit, because TLI is sometimes used to refer to the TargetLibraryInfo and occasionally to the TargetLibraryInfoImpl, and the latter is frequently referred to as TLII, could you change the description to say TLII or TLI Impl? Since this doesn't affect Targe

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:689 // Set up the per-function pass manager. - FPM.add(new TargetLibraryInfoWrapperPass(*TLII)); + FPM.add(new TargetLibraryInfoWrapperPass(TargetTriple)); if (CodeGenOpts.VerifyModule) ---

[clang-tools-extra] 101a69d - [clangd] Reland target_info_test

2020-04-12 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-04-12T16:10:04+02:00 New Revision: 101a69d71b93f901561621508ed36b187e594d91 URL: https://github.com/llvm/llvm-project/commit/101a69d71b93f901561621508ed36b187e594d91 DIFF: https://github.com/llvm/llvm-project/commit/101a69d71b93f901561621508ed36b187e594d91.dif

[PATCH] D76496: [clang-tidy] StringFindStartswith should ignore 3-arg find()

2020-04-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D76496#1949851 , @niko wrote: > Correct me if I'm wrong, but that seems to be in violation of IWYU? Maybe I'm > misreading this, or is the idea that higher-lever tooling (e.g. IWYU fixer) > is supposed to address that? It i

[PATCH] D77732: [clangd] Shard preamble symbols in dynamic index

2020-04-12 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:97 +/// paths used by \p FileSyms. +void shardSlabToFiles(const SymbolSlab &Syms, const RelationSlab &Rels, + FileSymbols &File

[PATCH] D77882: [clang-tidy] Add option to use alpha checkers from clang-analyzer when using `run-clang-tidy.py`

2020-04-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. LGTM! thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77882/new/ https://reviews.llvm.org/D77882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D77831: [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)?

2020-04-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 256842. njames93 added a comment. Added a few more cases by hand Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77831/new/ https://reviews.llvm.org/D77831 Files: clang-tools-extra/clang-tidy/bugprone/Argumen

[PATCH] D77947: [clangd] Send the correct error code when cancelling requests.

2020-04-12 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. Thanks for remembering this :D LGTM! Comment at: clang-tools-extra/clangd/JSONTransport.cpp:28 + [&](const CancelledError &C) -> llvm::Error { +switc

[PATCH] D71524: [analyzer] Support tainted objects in GenericTaintChecker

2020-04-12 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 updated this revision to Diff 256839. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71524/new/ https://reviews.llvm.org/D71524 Files: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp clang/lib/StaticAnalyzer/Checkers/Taint.cpp clang/test/Analysis/Inputs/system-heade

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-12 Thread Ten Tzen via Phabricator via cfe-commits
tentzen updated this revision to Diff 256840. tentzen marked an inline comment as done. tentzen added a comment. Add option -fms-extensions in test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77936/new/ https://reviews.llvm.org/D77936 File

[PATCH] D77955: [clangd] Add target_info test

2020-04-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 256841. kadircet added a comment. - Only test for arm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77955/new/ https://reviews.llvm.org/D77955 Files: clang-tools-extra/clangd/test/target_info.test Index: