[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a reviewer: NoQ. lebedev.ri added a comment. Herald added a subscriber: Charusso. In D76229#1925371 , @f00kat wrote: > In D76229#1925360 , @lebedev.ri > wrote: > > > This seems to be already handle

[PATCH] D60748: Fix i386 struct and union parameter alignment

2020-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D60748#1925907 , @LiuChen3 wrote: > In D60748#1924794 , @rjmccall wrote: > > > Oh, I see you just updated your patch months ago without ever mentioning > > that it was ready for review.

[PATCH] D76269: [opaque pointer types] Remove deprecated Instruction/IRBuilder APIs.

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: nhaehnle, t.p.northover, dblaikie. Herald added a reviewer: bollu. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. Removes deprecated overloads of LoadInst constructor, CallInst::Create, InvokeInst::Create, IRBui

[PATCH] D60748: Fix i386 struct and union parameter alignment

2020-03-16 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. In D60748#1924794 , @rjmccall wrote: > Oh, I see you just updated your patch months ago without ever mentioning that > it was ready for review. > > It sounds to me like GCC retroactively added a switch specifying which > version

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-16 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added a comment. In D75917#1925700 , @JonChesterfield wrote: > > I think I follow. The syncscope takes a string, therefore the builtin that > maps onto fence should also take a string for that parameter? That's fine by > me. Will help if a

[PATCH] D76262: [NFC] Add UsedDeclVisitor

2020-03-16 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. Thanks, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76262/new/ https://reviews.llvm.org/D76262 ___ cfe-commits mailing list

[PATCH] D76262: [NFC] Add UsedDeclVisitor

2020-03-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Sema/UsedDeclVisitor.h:43 + asImpl().visitUsedDecl(E->getMemberLoc(), D); +} + } rjmccall wrote: > You need to recurse on the base expression here. (And that's a good test > case for your own patch!)

[PATCH] D75169: [ARM] Enforcing calling convention for half-precision FP arguments and returns for big-endian AArch32

2020-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ugh. I'd hate to introduce yet another weird little tweak to `ABIArgInfo` that's used on exactly one target. For 16-bit composite types, we seem to coerce to a type like `[1 x i32]`; would that be okay here? You don't have a test that checks that you get the IR you w

[PATCH] D76262: [NFC] Add UsedDeclVisitor

2020-03-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 250688. yaxunl marked 2 inline comments as done. yaxunl added a comment. visit base expr of member expr. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76262/new/ https://reviews.llvm.org/D76262 Files: clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/U

[PATCH] D66094: [CodeGen] Emit destructor calls for non-trivial C structs returned by function calls and loaded from volatile objects

2020-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:677 + E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +Cleanup.setExprNeedsCleanups(true); + Why only when the l-value is volatile? Comment at

[PATCH] D76211: OpenMP Metadirective with user defined condition

2020-03-16 Thread Alok Mishra via Phabricator via cfe-commits
alokmishra.besu updated this revision to Diff 250684. alokmishra.besu added a comment. Herald added a project: OpenMP. Herald added a subscriber: openmp-commits. Adding test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76211/new/ https://revi

[PATCH] D75574: RFC: Implement objc_direct_protocol attribute to remove protocol metadata

2020-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a subscriber: manmanren. rjmccall added a comment. This might also be interesting to @manmanren. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75574/new/ https://reviews.llvm.org/D75574

[PATCH] D76264: [ObjC generics] Fix missing protocols on type parameter for unparameterized generics.

2020-03-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: erik.pilkington, ahatanak. Herald added subscribers: ributzka, jfb, dexonsmith, jkorous. Herald added a project: clang. When a type parameter is used with some protocols, we should keep these protocols both when the generic type is parameteri

[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

2020-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1514 + void visitUsedDecl(SourceLocation Loc, Decl *D) { +if (auto *TD = dyn_cast(D)) { + for (auto *DD : TD->decls()) { bader wrote: > yaxunl wrote: > > rjmccall wrote: > > > yaxunl wr

[PATCH] D76262: [NFC] Add UsedDeclVisitor

2020-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, looks good except for one oversight. Comment at: clang/lib/Sema/UsedDeclVisitor.h:43 + asImpl().visitUsedDecl(E->getMemberLoc(), D); +} + } You need to recurse on the base expression here. (And that's a good test cas

[PATCH] D75715: Switch TypeSystemClang over to CreateDeserialized() (NFC)

2020-03-16 Thread Adrian Prantl via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG90a2fbdb044b: Switch to TypeSystemClang over to CreateDeserialized() (NFC) (authored by aprantl). Herald added projects: clang, LLDB. Herald added a subscriber: cfe-commits. Changed prior to commit: htt

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-16 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D75917#1925617 , @sameerds wrote: > Is it really? The scope argument of the IR fence is a target-specific string: > http://llvm.org/docs/LangRef.html#syncscope > > The change that I see here is assuming a numerical argu

[PATCH] D76096: [clang] allow const structs to be constant expressions in initializer lists

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1013 + if (V->hasInit()) +return Visit(V->getInit(), V->getType()); +return nullptr; rsmith wrote: > efriedma wrote: > > rsmith wrote: > > > nickdesaulniers wrote: >

[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

2020-03-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 250666. yaxunl marked 6 inline comments as done. yaxunl added a comment. revised by John's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70172/new/ https://reviews.llvm.org/D70172 Files: clang/include/clang/Sema/ExternalSemaSource.h cl

[clang] 90a2fbd - Switch to TypeSystemClang over to CreateDeserialized() (NFC)

2020-03-16 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2020-03-16T18:11:36-07:00 New Revision: 90a2fbdb044bcf285646e79f3b096ccb196f6d02 URL: https://github.com/llvm/llvm-project/commit/90a2fbdb044bcf285646e79f3b096ccb196f6d02 DIFF: https://github.com/llvm/llvm-project/commit/90a2fbdb044bcf285646e79f3b096ccb196f6d02.diff

[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

2020-03-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 23 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Sema/Sema.h:1470 +/// diagnostics should be emitted. +SmallVector DeclsToCheckForDeferredDiags; + rjmccall wrote: > This needs to be saved and restored

[PATCH] D76262: [NFC] Add UsedDeclVisitor

2020-03-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: rjmccall. This patch is extracted from https://reviews.llvm.org/D70172 https://reviews.llvm.org/D76262 Files: clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/UsedDeclVisitor.h Index: clang/lib/Sema/UsedDeclVisitor.h

[PATCH] D76096: [clang] allow const structs to be constant expressions in initializer lists

2020-03-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1013 + if (V->hasInit()) +return Visit(V->getInit(), V->getType()); +return nullptr; efriedma wrote: > rsmith wrote: > > nickdesaulniers wrote: > > > efriedma wrote: >

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-16 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added a comment. In D75917#1917296 , @JonChesterfield wrote: > In D75917#1916972 , @sameerds wrote: > > > Well, there is a problem: The LangRef says that scopes are target-defined. > > This change says th

[PATCH] D75274: Fix profiling option on PS4 target

2020-03-16 Thread Dmitry Mikulin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfbb23c9714f2: Fix profiling options on PS4 target: - libclang_rt.profile should be added when… (authored by dmikulin). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior

[PATCH] D74238: [clang] Improve diagnostic note for implicit conversion sequences that would work if more than one implicit user-defined conversion were allowed.

2020-03-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. How do you defend against attempting an infinite sequence of user-defined conversion? For example: template struct X { operator X(); }; X<0> x0 = X<1>(); Comment at: clang/lib/Sema/SemaOverload.cpp:7333 +// Save the bad conversion in th

[clang] fbb23c9 - Fix profiling options on PS4 target:

2020-03-16 Thread Dmitry Mikulin via cfe-commits
Author: Dmitry Mikulin Date: 2020-03-16T16:52:47-07:00 New Revision: fbb23c9714f21c5f46ced5ccaed0cb90e05f61e7 URL: https://github.com/llvm/llvm-project/commit/fbb23c9714f21c5f46ced5ccaed0cb90e05f61e7 DIFF: https://github.com/llvm/llvm-project/commit/fbb23c9714f21c5f46ced5ccaed0cb90e05f61e7.diff

[PATCH] D76096: [clang] allow const structs to be constant expressions in initializer lists

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1013 + if (V->hasInit()) +return Visit(V->getInit(), V->getType()); +return nullptr; rsmith wrote: > nickdesaulniers wrote: > > efriedma wrote: > > > You need to be

[PATCH] D73513: [memtag] Plug in stack safety analysis.

2020-03-16 Thread Evgenii Stepanov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2a3723ef114d: [memtag] Plug in stack safety analysis. (authored by eugenis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73513/new/ https://reviews.llvm.o

LLVM buildmaster will be updated and restarted tonight

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

[clang] 19fccc5 - [Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id

2020-03-16 Thread Saar Raz via cfe-commits
Author: Saar Raz Date: 2020-03-17T01:49:42+02:00 New Revision: 19fccc52ff2c1da1f93d9317c34769bd9bab8ac8 URL: https://github.com/llvm/llvm-project/commit/19fccc52ff2c1da1f93d9317c34769bd9bab8ac8 DIFF: https://github.com/llvm/llvm-project/commit/19fccc52ff2c1da1f93d9317c34769bd9bab8ac8.diff LOG:

[clang] 2a3723e - [memtag] Plug in stack safety analysis.

2020-03-16 Thread Evgenii Stepanov via cfe-commits
Author: Evgenii Stepanov Date: 2020-03-16T16:35:25-07:00 New Revision: 2a3723ef114d467179d463539dd73974b87ccf85 URL: https://github.com/llvm/llvm-project/commit/2a3723ef114d467179d463539dd73974b87ccf85 DIFF: https://github.com/llvm/llvm-project/commit/2a3723ef114d467179d463539dd73974b87ccf85.di

[PATCH] D76096: [clang] allow const structs to be constant expressions in initializer lists

2020-03-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1013 + if (V->hasInit()) +return Visit(V->getInit(), V->getType()); +return nullptr; nickdesaulniers wrote: > efriedma wrote: > > You need to be more careful here; we

[PATCH] D76030: [CUDA] Warn about unsupported CUDA SDK version only if it's used.

2020-03-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added a subscriber: hans. tra added a comment. @hans -- this should be cherry-picked into 10 if it's not too late yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76030/new/ https://reviews.llvm.org/D76030

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat added a comment. In D76229#1925360 , @lebedev.ri wrote: > This seems to be already handled by clang static analyzer? > (`clang-analyzer-cplusplus.PlacementNew`) > > :19:5: warning: Storage provided to placement new is only 2 bytes, > whereas the

[PATCH] D75951: Keep a list of already-included pragma-once files for mods.

2020-03-16 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo marked an inline comment as done and an inline comment as not done. oontvoo added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:1266 + if (PP.isIncludeVisibleInLocalModule(File, M)) return false; + else PP.setIncludeVisibleForHeader(File, M); +

[PATCH] D75579: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime-registration

2020-03-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 250631. serge-sans-paille added a comment. Renamed registration constructor to use a more llvm-ish name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 Files

[PATCH] D75579: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime-registration

2020-03-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @MaskRay no longer a WIP ;-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat added a comment. In D76229#1925360 , @lebedev.ri wrote: > This seems to be already handled by clang static analyzer? > (`clang-analyzer-cplusplus.PlacementNew`) > > :19:5: warning: Storage provided to placement new is only 2 bytes, > whereas the

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat added a comment. In D76229#1925268 , @aaron.ballman wrote: > Have you considered making this a static analyzer check as opposed to a > clang-tidy check? I think using dataflow analysis will really reduce the > false positives because it will be a

[PATCH] D76062: [PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support

2020-03-16 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 250630. stuij edited the summary of this revision. stuij added a comment. Updating D76062 : [PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support follow changes in patch: [TableGen] Support combining AssemblerPredicates w

[PATCH] D75951: Keep a list of already-included pragma-once files for mods.

2020-03-16 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo marked an inline comment as done. oontvoo added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:1266 + if (PP.isIncludeVisibleInLocalModule(File, M)) return false; + else PP.setIncludeVisibleForHeader(File, M); +} else { jyknigh

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. This seems to be already handled by clang static analyzer? (`clang-analyzer-cplusplus.PlacementNew`) :19:5: warning: Storage provided to placement new is only 2 bytes, whe

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. The title still says this is a WIP.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 ___ cfe-commits ma

[PATCH] D75687: [clangd] Only minimally escape text when rendering to markdown.

2020-03-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry for the slow turnaround, bit off more than I could chew on a few fronts :-( Comment at: clang-tools-extra/clangd/FormattedString.cpp:69 +return false; + if (Contents.front() == '!' || Contents.front() == '?' || + Contents.front() == '

[PATCH] D75687: [clangd] Only minimally escape text when rendering to markdown.

2020-03-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 250624. sammccall marked 10 inline comments as done. sammccall added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75687/new/ https://reviews.llvm.org/D75687 Files: clang

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Have you considered making this a static analyzer check as opposed to a clang-tidy check? I think using dataflow analysis will really reduce the false positives because it will be able to track the allocation and alignment data across control flow. Repository:

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of the affected container

2020-03-16 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp:32 template void analyzerContainerDataField(const CallExpr *CE, CheckerContext &C, Sze

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-03-16 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:713 + StringRef Name; + if (const auto *DRE = dyn_cast(ContE->IgnoreParenCasts())) { +Name = DRE->getDecl()->ge

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-03-16 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:713 + StringRef Name; + if (const auto *DRE = dyn_cast(ContE->IgnoreParenCasts())) { +Name = DRE->getDecl()->ge

[PATCH] D76078: [AArch64][SVE] Add a pass for SVE intrinsic optimisations

2020-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
andwar added a comment. Cheers for working on this @kmclaughlin ! Have you considered adding an interface for the new PM? You could check this for reference: https://reviews.llvm.org/rGd6de5f12d485a85504bc99d384a85634574a27e2 (also implements a FunctionPass). Comment at: llv

[PATCH] D73967: Implement _ExtInt as an extended int type specifier.

2020-03-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73967/new/ https://reviews.llvm.org/D73967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D76219: [Sema][SVE] Reject "delete" with sizeless types

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76219/new/ https://reviews.llvm.org/D76219 ___

[PATCH] D75811: [CUDA] Choose default architecture based on CUDA installation

2020-03-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D75811#1923281 , @tambre wrote: > Your help here and over on CMake's side has been very helpful. Thank you! > I'll @ you on CMake's side if I need any help while working on CUDA support. > Hopefully you won't mind. :) No problem

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @MaskRay gentle up :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D76084: [Sema][SVE] Reject subscripts on pointers to sizeless types

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. We already support sizeof expressions where the result can't be computed at compile-time. For example: `int f(int n, int (*p)[n]) { return sizeof(*p); }`. (For constant contexts specifically, see HandleSizeof() in ExprConstant.cpp.) I think any argument that it woul

[PATCH] D76084: [Sema][SVE] Reject subscripts on pointers to sizeless types

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. This patch LGTM, at least for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76084/new/ https://reviews.llvm.org/D76084 _

[PATCH] D76220: [Syntax] Build declarator nodes

2020-03-16 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7d382dcd46a1: [Syntax] Build declarator nodes (authored by hlopko, committed by gribozavr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76220/new/ https:/

[PATCH] D76086: [Sema][SVE] Reject arithmetic on pointers to sizeless types

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I don't think there's really any reason to force the user into this sort of thing... but again, we can relax this later, so I'm not that concerned about it at the moment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7608

[PATCH] D72089: [Syntax] Build declarator nodes

2020-03-16 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. This revision is now accepted and ready to land. Superseded by https://reviews.llvm.org/D76220. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72089/new/ https://reviews.llvm.org/D72089

[PATCH] D76220: [Syntax] Build declarator nodes

2020-03-16 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. BTW, would be also nice to have tests for trailing return types not at the top level -- in a follow-up: `auto x(char a, auto (*b)(int) -> short) -> void;` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[clang] 7d382dc - [Syntax] Build declarator nodes

2020-03-16 Thread Dmitri Gribenko via cfe-commits
Author: Marcel Hlopko Date: 2020-03-16T19:13:59+01:00 New Revision: 7d382dcd46a18c23a01e3754807f577598a9bc84 URL: https://github.com/llvm/llvm-project/commit/7d382dcd46a18c23a01e3754807f577598a9bc84 DIFF: https://github.com/llvm/llvm-project/commit/7d382dcd46a18c23a01e3754807f577598a9bc84.diff

[PATCH] D75010: [OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.

2020-03-16 Thread Stefan Stipanovic via Phabricator via cfe-commits
sstefan1 updated this revision to Diff 250599. sstefan1 added a comment. more tests couldn't get `update_test_checks.py` to update function signatures, even with the flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75010/new/ https://reviews.l

[PATCH] D76218: [Sema][SVE] Reject "new" with sizeless types

2020-03-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76218/new/ https://reviews.llvm.org/D76218 ___

[PATCH] D76130: [PPC][AIX] Implement variadic function handling in LowerFormalArguments_AIX.

2020-03-16 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added a comment. As a first step, I suggest we break the clang changes and the LLVM changes into 2 separate patches. Repository: rZORG LLVM Github Zorg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76130/new/ https://reviews.llvm.org/D76130 __

[PATCH] D76062: [PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support

2020-03-16 Thread Ties Stuij via Phabricator via cfe-commits
stuij commandeered this revision. stuij added a reviewer: LukeGeeson. stuij added a comment. Commandeered because Luke is on vacation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76062/new/ https://reviews.llvm.org/D76062 _

[PATCH] D76122: [ARM,MVE] Add intrinsics and isel for MVE integer VMLA.

2020-03-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:14289-14292 case Intrinsic::arm_neon_vqrshifts: case Intrinsic::arm_neon_vqrshiftu: // No immediate versions of these to check for.

[PATCH] D76220: [Syntax] Build declarator nodes

2020-03-16 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko updated this revision to Diff 250591. hlopko added a comment. Fix clang tidy warning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76220/new/ https://reviews.llvm.org/D76220 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/lib/T

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-03-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 3 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:88 struct FnDescription; using FnCheck = std::function; NoQ wrote: > balazske wrote: > > NoQ wrote: > > > `llvm::function_

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-03-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 250588. balazske marked 2 inline comments as done. balazske added a comment. Addressed some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75682/new/ https://reviews.llvm.org/D75682 Files: clang/li

[PATCH] D75063: [analyzer] StdLibraryFunctionsChecker: Add NotNull Arg Constraint

2020-03-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:189 +ValueConstraintPtr negate() const override { + NotNullConstraint tmp(*this); + tmp.CannotBeNull = !this->CannotBeNull; Is `Tmp` better

[PATCH] D60748: Fix i386 struct and union parameter alignment

2020-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, I see you just updated your patch months ago without ever mentioning that it was ready for review. It sounds to me like GCC retroactively added a switch specifying which version of the ABI to follow on this point, somewhat confusingly called `-malign-data`. That'

[PATCH] D76234: clang: Simplify implementation of Type::isXXXType()

2020-03-16 Thread Yannic Bonenberger via Phabricator via cfe-commits
yannic created this revision. yannic added reviewers: klimek, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76234 Files: clang/include/clang/AST/Type.h Index: clang/include/clang/AST/Type.h =

[PATCH] D73638: [AST] Move dependence computations into a separate file

2020-03-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. (I do think there are ways we could write the dependency computations more clearly, but don't want to diverge further from the existing code) Comment at: clang/include

[PATCH] D76128: [AST] Correct the CXXOperatorCallExpr source range.

2020-03-16 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8a593e29ab9b: [AST] Correct the CXXOperatorCallExpr source range. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76128/new/ https://rev

[PATCH] D76125: [clangd] Decouple preambleworker from astworker, NFCI

2020-03-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:155 namespace { +/// Responsible for building and providing access to the preamble of a TU. This +/// worker doesn't guarantee that each preamble request will be built, in case

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:32 #include "llvm/TableGen/Error.h" +#include "clang/Basic/AArch64SVETypeFlags.h" #include sdesmalen wrote: > thakis wrote: > > Including stuff from `clang/Basic` in clang/utils/Tabl

[PATCH] D76220: [Syntax] Build declarator nodes

2020-03-16 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko updated this revision to Diff 250574. hlopko marked 8 inline comments as done. hlopko added a comment. Resolving comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76220/new/ https://reviews.llvm.org/D76220 Files: clang/include/clang

[PATCH] D76220: [Syntax] Build declarator nodes

2020-03-16 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:522 +/// `(volatile int a)` in `int foo(volatile int a);` +/// `(int&& a)` in `int foo(int&& a);` +/// `() -> int` in `auto foo() -> int;` gribozavr2 wrote: > I meant: > > `i

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-16 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, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76184/new/ https://reviews.llvm.org/D76184

[clang] 8a593e2 - [AST] Correct the CXXOperatorCallExpr source range.

2020-03-16 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-03-16T16:51:10+01:00 New Revision: 8a593e29ab9b2799ded3d85a8110d51d4283f128 URL: https://github.com/llvm/llvm-project/commit/8a593e29ab9b2799ded3d85a8110d51d4283f128 DIFF: https://github.com/llvm/llvm-project/commit/8a593e29ab9b2799ded3d85a8110d51d4283f128.diff LO

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-03-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D71018#1924604 , @martong wrote: > - Remove redundant VisitQualifiedTypeLoc and VisitAttributedTypeLoc I realized that the mentioned functions are redundant, because we have a while loop which iterates over all related typelo

[PATCH] D76196: [ASTMatchers] Extend hasReturnValue to GNU StmtExpr

2020-03-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 250569. njames93 added a comment. - Rename matcher to hasFinalExpr - Don't review it yet Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76196/new/ https://reviews.llvm.org/D76196 Files: clang/docs/LibASTMatc

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Also fix the test case, premerge found a failure Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:23 + + for (const Stmt *Child : TheStmt->children()) { +if (const auto *TheDeclRefExpr = dyn_cast(Child))

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-03-16 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 250570. martong added a comment. - Fix the base commit of this patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71018/new/ https://reviews.llvm.org/D71018 Files: clang/lib/AST/ASTImporter.cpp clang/unit

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-03-16 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 250568. martong added a comment. - Remove redundant VisitQualifiedTypeLoc and VisitAttributedTypeLoc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71018/new/ https://reviews.llvm.org/D71018 Files: clang/lib/

[clang] 6ce537c - Revert "[SVE] Auto-generate builtins and header for svld1."

2020-03-16 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-03-16T15:22:15Z New Revision: 6ce537ccfcfc9262ecb8472f7f3c86285b7198fb URL: https://github.com/llvm/llvm-project/commit/6ce537ccfcfc9262ecb8472f7f3c86285b7198fb DIFF: https://github.com/llvm/llvm-project/commit/6ce537ccfcfc9262ecb8472f7f3c86285b7198fb.diff L

[PATCH] D76220: [Syntax] Build declarator nodes

2020-03-16 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:519 + +/// Parameter list for a function type. +/// E.g.: ... and a trailing return type, if the function has one. Comment at: clang/include/clang/Tooling/

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-16 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. This patch broke the Clang build with enabled modules (which is used by the LLDB bot, but every other bot is also dead: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked 2 inline comments as done. sdesmalen added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:32 #include "llvm/TableGen/Error.h" +#include "clang/Basic/AArch64SVETypeFlags.h" #include thakis wrote: > Including stuff from `clang/

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:43 +} + + Unnecessary empty line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76229/new/ https://r

[PATCH] D76122: [ARM,MVE] Add intrinsics and isel for MVE integer VMLA.

2020-03-16 Thread Dave Green via Phabricator via cfe-commits
dmgreen accepted this revision. dmgreen added a comment. This revision is now accepted and ready to land. LGTM Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:14289-14292 case Intrinsic::arm_neon_vqrshifts: case Intrinsic::arm_neon_vqrshiftu: // No immediate vers

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

2020-03-16 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D71524#1917251 , @Szelethus wrote: > Are we sure this is what we want? If this is a heuristic, we should document > it well, and even then I'm not sure whether we want it. I'm also pretty sure > this would make the eventual c

[PATCH] D76094: [clangd] Change line break behaviour for hoverinfo

2020-03-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I understand the main goal here is preserving intended line breaks in documentation comments? Thanks for tackling this problem! A design goal here is that the markup objects are the source of truth about the document structure. So if we've decided we want a comment to

[PATCH] D75446: [clang][Syntax] Handle macro arguments in spelledForExpanded

2020-03-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I think per offline discussion, this was going to have some additional docs clarifying the contracts of this function, and maybe extra tests? The conclusion IIRC was that this function is designed to find the text that you could replace in order to replace an AST node

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat updated this revision to Diff 250556. f00kat added a comment. Fix 'const auto*' in function getDescendantValueDecl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76229/new/ https://reviews.llvm.org/D76229 Files: clang-tools-extra/clang-tid

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat updated this revision to Diff 250555. f00kat added a comment. 1. Static functions instead of anonymous namespaces. 2. const auto*. 3. Added double back-ticks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76229/new/ https://reviews.llvm.org/

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-03-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:88 struct FnDescription; using FnCheck = std::function; balazske wrote: > NoQ wrote: > > `llvm::function_ref`? > `function_ref`'s documentation says: > > This class does

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:19 + +namespace { +const ValueDecl *getDescendantValueDecl(const Stmt *TheStmt) { Please use static instead of anonymous namespaces for functions. See

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:32 #include "llvm/TableGen/Error.h" +#include "clang/Basic/AArch64SVETypeFlags.h" #include Including stuff from `clang/Basic` in clang/utils/TableGen is conceptually a layering viol

  1   2   >