[PATCH] D86290: Move all fields of '-cc1' option related classes into def file databases

2020-09-02 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. Just to also jump in on the thread: This broke the modules builds. I fixed that in https://reviews.llvm.org/rGe0e7eb2e2648aee83caf2ecfe2972ce2f653d306 so please recommit that patch or merge it into this revision before relanding. Thanks! Repository: rG LLVM

[PATCH] D77491: [Sema] Introduce BuiltinAttr, per-declaration builtin-ness

2020-09-02 Thread Raul Tambre via Phabricator via cfe-commits
tambre added a comment. Thanks for the review! I believe I've managed to address your comments. In D77491#2248454 , @rsmith wrote: > What happens for builtins with the "t" (custom typechecking) flag, for which > the signature is intended to have no

[PATCH] D77491: [Sema] Introduce BuiltinAttr, per-declaration builtin-ness

2020-09-02 Thread Raul Tambre via Phabricator via cfe-commits
tambre updated this revision to Diff 289631. tambre marked 6 inline comments as done. tambre added a comment. Remove __inline__ and static from all builtins in intrin.h. Remove ASTReader/ASTWriter placeholders. During builtin recognition: - Use ASTContext::GetBuiltinType() instead of creating a

[PATCH] D86820: [X86] Add a /tune: option for clang-cl

2020-09-02 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGca134374b74e: [X86] Add a /tune: option for clang-cl (authored by craig.topper). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] ca13437 - [X86] Add a /tune: option for clang-cl

2020-09-02 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2020-09-02T20:27:38-07:00 New Revision: ca134374b74e2c2c6e96695502f3a0974c1da4c1 URL: https://github.com/llvm/llvm-project/commit/ca134374b74e2c2c6e96695502f3a0974c1da4c1 DIFF: https://github.com/llvm/llvm-project/commit/ca134374b74e2c2c6e96695502f3a0974c1da4c1.diff

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-09-02 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. Please no worry to give me your suggestions and feedback. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:185 +getHungarianNotationTypePrefix(const std::string , + const NamedDecl *Decl) {

[PATCH] D87031: [libTooling] Provide overloads of `rewriteDescendants` that operate directly on an AST node.

2020-09-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the review! Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:388 +llvm::Expected> +rewriteDescendants(const Decl , RewriteRule Rule, + const ast_matchers::MatchFinder::MatchResult );

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:597 const auto = Segments[I]; - if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col < R.Col)) { + if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col <= R.Col)) {

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289617. zequanwu added a comment. address comment. emit second segment when first segment is skipped and activeregions is not empty. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2020-09-02 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 289616. plotfi added a comment. I've updated the diff to reflect the alternate non-wrapper exposure. This way requires the sanitizing of the exported objc_direct method name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D87066: Thread safety analysis: Improve documentation for scoped capabilities

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Not sure about the added comments, I can also remove them if they're not helpful. @aaron.ballman, this addresses your earlier comment D81332#2079489 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D87066: Thread safety analysis: Improve documentation for scoped capabilities

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. aaronpuchert requested review of this revision. They are for more powerful than the current documentation implies, this adds - adopting a lock,

[PATCH] D87065: Thread safety analysis: Document how try-acquire is handled

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. aaronpuchert requested review of this revision. I don't think this is obvious, since try-acquire seemingly contradicts our usual requirements of

[PATCH] D87064: Thread safety analysis: Test and document release_generic_capability

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. aaronpuchert requested review of this revision. The old locking attributes had a generic release, but as it turns out the capability-based

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-02 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 marked 5 inline comments as done. shivanshu3 added inline comments. Comment at: clang/lib/Tooling/ArgumentsAdjusters.cpp:117 + // do not remove those when using the cl driver. + bool IsDependencyFileArg; + if (Arg.startswith("/showIncludes") ||

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-02 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 updated this revision to Diff 289606. shivanshu3 added a comment. - Simplified the implementation of `getDriverMode` and got rid of the `Optional` return type. - When using the cl driver mode, we do not want to skip the next argument for -MF, -MT, -MQ. Repository: rG LLVM Github

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 289607. aaronpuchert added a comment. Fix as suggested by @rsmith instead: set InvalidDecl directly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86207/new/ https://reviews.llvm.org/D86207 Files:

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Everything compiles with `ValueDecl* Decomp` instead of a `LazyDeclPtr`, but I'll leave it until we figure out whether we might actually need it. Maybe we want to store the decomposition for a binding, just like we store the bindings for a decomposition. Although

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:895 + if (!Self.getLangOpts().RTTIData) { +bool isMSVC = Self.getDiagnostics().getDiagnosticOptions().getFormat() == + DiagnosticOptions::MSVC; hans wrote: > zequanwu

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. I'll go with what @rsmith proposed to fix the bug. If the entire deserialization process doesn't rely on invariants, the order should indeed be irrelevant. In D86207#2252557 , @riccibruno wrote: > I agree, but I think that

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289603. zequanwu added a comment. warn at dynamic_cast like MSVC in clang-cl, but not in clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files:

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I'm not as familiar with the preprocessor bits, but this looks like it's in good shape. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:597 const auto = Segments[I]; - if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col <

[PATCH] D87062: [DebugInfo] Add size to class declarations in debug info.

2020-09-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 289602. akhuang marked an inline comment as done. akhuang added a comment. remove assert; edit test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87062/new/ https://reviews.llvm.org/D87062 Files:

[PATCH] D87062: [DebugInfo] Add size to class declarations in debug info.

2020-09-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1035 + const RecordDecl *D = RD->getDefinition(); + if (D && D->isCompleteDefinition()) +Size = CGM.getContext().getTypeSize(Ty); dblaikie wrote: > When is a definition not a

[PATCH] D87031: [libTooling] Provide overloads of `rewriteDescendants` that operate directly on an AST node.

2020-09-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:388 +llvm::Expected> +rewriteDescendants(const Decl , RewriteRule Rule, +

[PATCH] D87062: [DebugInfo] Add size to class declarations in debug info.

2020-09-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1035 + const RecordDecl *D = RD->getDefinition(); + if (D && D->isCompleteDefinition()) +Size = CGM.getContext().getTypeSize(Ty); When is a definition not a complete definition?

[PATCH] D86508: [clang] improve GCC-compat for C90 __builtin_ functions

2020-09-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Ok, this is ready for review. I plan to review the newer C standards than ISO C90 in follow up patches, so I'll likely be touching these file more. Figuring out a more maintainable sort order in particular is an itch I'd like to scratch. Repository: rG

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-09-02 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 289597. gamesh411 added a comment. only consider global and ::std scope handlers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D87062: [DebugInfo] Add size to class declarations in debug info.

2020-09-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added reviewers: aprantl, dblaikie. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. akhuang requested review of this revision. Herald added a subscriber: ormris. This adds the size to forward declared class

[PATCH] D86508: [clang] improve GCC-compat for C90 __builtin_ functions

2020-09-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 289594. nickdesaulniers added a comment. - improve docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86508/new/ https://reviews.llvm.org/D86508 Files: clang/docs/LanguageExtensions.rst

[PATCH] D87051: scan-build-py: fix multiprocessing error

2020-09-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. From the docs: > `multiprocessing.freeze_support()` > Add support for when a program which uses multiprocessing has been frozen to > produce a Windows executable. (Has been tested with

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:483 bool GapRegion = CR.value().Kind == CounterMappingRegion::GapRegion; if (CR.index() + 1 == Regions.size() || vsk wrote: > zequanwu wrote: > > vsk

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289582. zequanwu added a comment. Emit second segment as wrapped segment only when first segment is RegionEntry Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 Files:

[PATCH] D86508: [clang] implement+test remaining C90 __builtin_ functions

2020-09-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2422 +* ``vprintf`` +* ``vsprintf`` + Let me triple check the docs look good. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D86508: [clang] implement+test remaining C90 __builtin_ functions

2020-09-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked 2 inline comments as done. nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:513 BUILTIN(__builtin_printf, "icC*.", "Fp:0:") +BUILTIN(__builtin_putchar, "ii", "F") +BUILTIN(__builtin_puts, "icC*", "nF")

[PATCH] D86621: [clang][Sparc] Default to -mcpu=v9 for SparcV8 on Solaris

2020-09-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Basic/Targets/Sparc.cpp:224 +Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); + } } ro wrote: > efriedma wrote: > > ro wrote: > > > efriedma wrote: > > > > ro wrote: > > > > > efriedma wrote:

[PATCH] D86508: [clang] implement+test remaining C90 __builtin_ functions

2020-09-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 289572. nickdesaulniers added a comment. - add putc and fputc builtins Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86508/new/ https://reviews.llvm.org/D86508 Files:

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks, I have followed the flow. The logic looks good. But I have got some nits and a question about the `clang/test/` assembly test. Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1033 +/// * 2nd bit: set if it is a block ending with a tail

[PATCH] D85613: [clang] Look through bindings when checking whether a default argument references a local entity.

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Ah, I guess Ianded on an older version of this through a link and didn't notice. Nevermind. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85613/new/ https://reviews.llvm.org/D85613

[clang] 272742a - Perform an extra consistency check when searching ModuleManager's

2020-09-02 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2020-09-02T14:16:26-07:00 New Revision: 272742a92d2443893eb98a7b3460e243e34278f9 URL: https://github.com/llvm/llvm-project/commit/272742a92d2443893eb98a7b3460e243e34278f9 DIFF: https://github.com/llvm/llvm-project/commit/272742a92d2443893eb98a7b3460e243e34278f9.diff

[PATCH] D86823: [clang][Modules] Perform an Extra Consistency Check When Searching The ModuleManager's Cache For Implicit Modules

2020-09-02 Thread Adrian Prantl via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG272742a92d24: Perform an extra consistency check when searching ModuleManagers (authored by aprantl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 3b12e12 - Revert "[clang] Add missing .def files to Clang's modulemap"

2020-09-02 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2020-09-02T14:15:32-07:00 New Revision: 3b12e12d4b9efbdd28113da6db0f74b660257c83 URL: https://github.com/llvm/llvm-project/commit/3b12e12d4b9efbdd28113da6db0f74b660257c83 DIFF: https://github.com/llvm/llvm-project/commit/3b12e12d4b9efbdd28113da6db0f74b660257c83.diff

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D85408#2253073 , @tmsriram wrote: > In D85408#2253055 , @MaskRay wrote: > >> I am still reading the patch, but I have noticed one thing worth discussing. >> `.bb_addr_map` is a

[PATCH] D87049: Exploratory patch - capture DebugInfo for constexpr variables used within lambda

2020-09-02 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D87049#2253150 , @dblaikie wrote: > I think it'd be helpful to discuss what the DWARF does and should look like > in this case (I wonder if, maybe, the better solution is in the DWARF > consumer - to do name lookup out

[PATCH] D87049: Exploratory patch - capture DebugInfo for constexpr variables used within lambda

2020-09-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I think it'd be helpful to discuss what the DWARF does and should look like in this case (I wonder if, maybe, the better solution is in the DWARF consumer - to do name lookup out through the lambda) - could you provide some summarized llvm-dwarfdump output comparisons

[PATCH] D86508: [clang] implement+test remaining C90 __builtin_ functions

2020-09-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:513 BUILTIN(__builtin_printf, "icC*.", "Fp:0:") +BUILTIN(__builtin_putchar, "ii", "F") +BUILTIN(__builtin_puts, "icC*", "nF") nickdesaulniers wrote: > nickdesaulniers

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Han Shen via Phabricator via cfe-commits
shenhan added a comment. In D85408#2253055 , @MaskRay wrote: > I am still reading the patch, but I have noticed one thing worth discussing. > `.bb_addr_map` is a non-SHF_ALLOC section (meaning that it is not part of the > memory image). An absolute

[clang] 62dbb7e - Revert "[HIP] Change default --gpu-max-threads-per-block value to 1024"

2020-09-02 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2020-09-02T16:12:28-04:00 New Revision: 62dbb7e54c65386f3cd73ef761a22b73532158f0 URL: https://github.com/llvm/llvm-project/commit/62dbb7e54c65386f3cd73ef761a22b73532158f0 DIFF:

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:578 +static std::pair +getLikelihood(const Stmt *Stmt) { + if (const auto *AS = dyn_cast(Stmt)) rsmith wrote: > Mordante wrote: > > aaron.ballman

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. In D85408#2253055 , @MaskRay wrote: > I am still reading the patch, but I have noticed one thing worth discussing. > `.bb_addr_map` is a non-SHF_ALLOC section (meaning that it is not part of the > memory image). An absolute

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. I am still reading the patch, but I have noticed one thing worth discussing. `.bb_addr_map` is a non-SHF_ALLOC section (meaning that it is not part of the memory image). An

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: rsmith. MaskRay added inline comments. Comment at: clang/test/CodeGen/basic-block-sections.c:31 // BB_LABELS: world: -// BB_LABELS: a.BB.world: -// BB_LABELS: aa.BB.world: -// BB_LABELS: a.BB.another: +// BB_LABELS: .Lfunc_begin0: +// BB_LABELS:

[clang] 6f0a371 - [libTooling] Restore defaults for matchers in makeRule.

2020-09-02 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-09-02T19:36:14Z New Revision: 6f0a3711bc15f8b50ad56d64eee70d9ba62f70c6 URL: https://github.com/llvm/llvm-project/commit/6f0a3711bc15f8b50ad56d64eee70d9ba62f70c6 DIFF: https://github.com/llvm/llvm-project/commit/6f0a3711bc15f8b50ad56d64eee70d9ba62f70c6.diff

[PATCH] D87048: [libTooling] Restore defaults for matchers in makeRule.

2020-09-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6f0a3711bc15: [libTooling] Restore defaults for matchers in makeRule. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87048/new/

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/Stmt.h:1105- + /// The likelihood of a branch being taken. + enum Likelihood { +LH_None, ///< No attribute set. +LH_Likely, ///< Branch has the [[likely]] attribute. +LH_Unlikely, ///<

[PATCH] D87047: [clang] Add command line options for the Machine Function Splitter.

2020-09-02 Thread David Li via Phabricator via cfe-commits
davidxl added a comment. For x86 target, should it be turned on when -fprofile-use= option is specified unless -fno-split-machine-function is specified? Also is it worth to give a warning if the option is specified but PGO is not on? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D83955: [PowerPC][Power10] Implementation of 128-bit Binary Vector Multiply builtins

2020-09-02 Thread Albion Fung via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5d1fe3f903b9: [PowerPC] Implemented Vector Multiply Builtins (authored by Conanap). Changed prior to commit:

[clang] 5d1fe3f - [PowerPC] Implemented Vector Multiply Builtins

2020-09-02 Thread Albion Fung via cfe-commits
Author: Albion Fung Date: 2020-09-02T14:16:21-05:00 New Revision: 5d1fe3f903b9f46b994956f3b214305be119c4e2 URL: https://github.com/llvm/llvm-project/commit/5d1fe3f903b9f46b994956f3b214305be119c4e2 DIFF: https://github.com/llvm/llvm-project/commit/5d1fe3f903b9f46b994956f3b214305be119c4e2.diff

[PATCH] D87051: scan-build-py: fix multiprocessing error

2020-09-02 Thread Lawrence D'Anna via Phabricator via cfe-commits
lawrence_danna created this revision. lawrence_danna added reviewers: ldionne, chandlerc, jasonmolenda, JDevlieghere. Herald added subscribers: cfe-commits, dexonsmith, whisperity. Herald added a project: clang. lawrence_danna requested review of this revision. Recent versions of python3's

[PATCH] D86290: Move all fields of '-cc1' option related classes into def file databases

2020-09-02 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. Thanks for the revert. In addition to the one eabi test, we saw widespread msan use-of-uninitialized-value errors from here: https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/ARM/ARMTargetMachine.cpp#L229. I think it would explain the eabi test

[clang] 2d11ae0 - Fix a -Wparenthesis warning in 8ff44e644bb7, NFC

2020-09-02 Thread Erik Pilkington via cfe-commits
Author: Erik Pilkington Date: 2020-09-02T15:01:54-04:00 New Revision: 2d11ae0a40e209a7b91aeff0c9cf28fe41dce93c URL: https://github.com/llvm/llvm-project/commit/2d11ae0a40e209a7b91aeff0c9cf28fe41dce93c DIFF:

[PATCH] D76323: [AST] Fix handling of long double and bool in __builtin_bit_cast

2020-09-02 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9523cf02c22a: [AST] Fix handling of long double and bool in __builtin_bit_cast (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 9523cf0 - [AST] Fix handling of long double and bool in __builtin_bit_cast

2020-09-02 Thread Erik Pilkington via cfe-commits
Author: Erik Pilkington Date: 2020-09-02T15:01:53-04:00 New Revision: 9523cf02c22a83bece8d81080693a0cbf4098bb5 URL: https://github.com/llvm/llvm-project/commit/9523cf02c22a83bece8d81080693a0cbf4098bb5 DIFF:

[PATCH] D86621: [clang][Sparc] Default to -mcpu=v9 for SparcV8 on Solaris

2020-09-02 Thread Rainer Orth via Phabricator via cfe-commits
ro added inline comments. Comment at: clang/lib/Basic/Targets/Sparc.cpp:224 +Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); + } } efriedma wrote: > ro wrote: > > efriedma wrote: > > > ro wrote: > > > > efriedma wrote: > > > > > ro wrote: > > >

[PATCH] D87049: Exploratory patch - capture DebugInfo for constexpr variables used within lambda

2020-09-02 Thread Melanie Blower via Phabricator via cfe-commits
mibintc created this revision. mibintc added a reviewer: debug-info. Herald added a project: clang. mibintc requested review of this revision. This is an exploratory patch, an attempt to solve bugs.llvm.org/show_bug.cgi?id=47400 That bug report shows a simple test case where the constexpr

[PATCH] D87048: [libTooling] Restore defaults for matchers in makeRule.

2020-09-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. ymandel requested review of this revision. This patch restores the default traversal for Transformer's `makeRule` to `TK_AsIs`. The implicit mode has proven problematic. Repository: rG LLVM

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:585 D->setLocation(ThisDeclLoc); D->setInvalidDecl(Record.readInt()); if (Record.readInt()) { // hasAttrs The bug is here: we should not be calling

[clang] e0e7eb2 - [clang] Add missing .def files to Clang's modulemap

2020-09-02 Thread Raphael Isemann via cfe-commits
Author: Raphael Isemann Date: 2020-09-02T20:42:12+02:00 New Revision: e0e7eb2e2648aee83caf2ecfe2972ce2f653d306 URL: https://github.com/llvm/llvm-project/commit/e0e7eb2e2648aee83caf2ecfe2972ce2f653d306 DIFF:

[PATCH] D86621: [clang][Sparc] Default to -mcpu=v9 for SparcV8 on Solaris

2020-09-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Basic/Targets/Sparc.cpp:224 +Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); + } } ro wrote: > efriedma wrote: > > ro wrote: > > > efriedma wrote: > > > > ro wrote: > > > > > efriedma wrote:

[PATCH] D87047: [clang] Add command line options for the Machine Function Splitter.

2020-09-02 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish created this revision. snehasish added reviewers: tmsriram, davidxl. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. snehasish requested review of this revision. This patch adds a command line flag for the machine function splitter (added in rG94faadaca4e1

[PATCH] D84886: Create LoopNestPass

2020-09-02 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu added a comment. Hi, thanks for your comments and suggestions! I've thought about the suggestion by @ychen to extend the existing `LoopPassManager` to handle loop-nest passes instead of having a separate `LoopNestPassManager`, and I've uploaded a new patch D87045

[PATCH] D86993: Document Clang's expectations of the C standard library.

2020-09-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D86993#2251198 , @rjmccall wrote: > Wording looks good. Should we alsso document our assumptions about what > functions exist in the standard library — the functions that we'll always use > even in freestanding builds?

[PATCH] D86089: [flang][driver]Add experimental flang driver and frontend with help screen

2020-09-02 Thread Richard Barton via Phabricator via cfe-commits
richard.barton.arm requested changes to this revision. richard.barton.arm added a comment. This revision now requires changes to proceed. Requesting changes mostly because of the exit status issue on the Driver tests. A few general questions as well: 1. Why not implement `-###` as part of this

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:895 + if (!Self.getLangOpts().RTTIData) { +bool isMSVC = Self.getDiagnostics().getDiagnosticOptions().getFormat() == + DiagnosticOptions::MSVC; zequanwu wrote: > hans

[PATCH] D86290: Move all fields of '-cc1' option related classes into def file databases

2020-09-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. I have reverted this change in 8d2d0e84857cb1f2d01456eb433b5172d3a0772b to get the build bots green again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D86721: [clang-format] Parse double-square attributes as pointer qualifiers

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd70e05c9e36a: [clang-format] Parse double-square attributes as pointer qualifiers (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] d70e05c - [clang-format] Parse double-square attributes as pointer qualifiers

2020-09-02 Thread Alex Richardson via cfe-commits
Author: Alex Richardson Date: 2020-09-02T18:35:21+01:00 New Revision: d70e05c9e36ada3ea6341764a3bc34de7de7d8dd URL: https://github.com/llvm/llvm-project/commit/d70e05c9e36ada3ea6341764a3bc34de7de7d8dd DIFF:

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289510. arichardson added a comment. rebase to keep dependent revisions happy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86960/new/ https://reviews.llvm.org/D86960 Files:

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289509. arichardson added a comment. - fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86959/new/ https://reviews.llvm.org/D86959 Files: clang/lib/Format/FormatToken.cpp

[PATCH] D87028: [clang-format] Improve heuristic for detecting function declarations

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289508. arichardson added a comment. fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87028/new/ https://reviews.llvm.org/D87028 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D82994: [RFC] Instrumenting Clang/LLVM with Perfetto

2020-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:244 VALUE_CODEGENOPT(TimeTraceGranularity, 32, 500) ///< Minimum time granularity (in microseconds), +CODEGENOPT(Perfetto , 1, 0) ///< Set when -perfetto is enabled.

[PATCH] D85613: [clang] Look through bindings when checking whether a default argument references a local entity.

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 2 inline comments as done. riccibruno added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:91 + auto CheckAndDiagnoseLocalEntity = [&](const VarDecl *VD, unsigned DiagID, + const auto &... DiagArgs) -> bool

[PATCH] D86853: [modules] Fix crash in call to `FunctionDecl::setPure()`

2020-09-02 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg updated this revision to Diff 289506. andrewjcg marked 2 inline comments as done. andrewjcg added a comment. feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86853/new/ https://reviews.llvm.org/D86853 Files:

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-02 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx marked 2 inline comments as done. chrish_ericsson_atx added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13989 + MaxElems <<= AddrBits; + MaxElems /= ElemBytes; + ebevhan wrote: > The size calculations here could

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 8 inline comments as done. Mordante added a comment. In D85091#2250657 , @rsmith wrote: > Looking specifically for attributes in the 'then' and 'else' cases of an `if` > seems like a fine first pass at this, but I think this is the wrong

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-02 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx updated this revision to Diff 289503. chrish_ericsson_atx added a comment. Updating D86796 : [Sema] Address-space sensitive index check for unbounded arrays Refactored math as suggested by Bevin Hansson. Repository: rG LLVM Github

[PATCH] D87043: [Analyzer] Fix for dereferece of smart pointer after branching on unknown inner pointer

2020-09-02 Thread Nithin VR via Phabricator via cfe-commits
vrnithinkumar created this revision. Herald added subscribers: cfe-commits, steakhal, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. vrnithinkumar requested review of this

[PATCH] D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D85528#2232074 , @xazax.hun wrote: > I'm not opposed to landing this to master, as we will have more time there to > see whether there are any unwanted side effects in practice. I made some experiments on the following

[PATCH] D86091: [cmake] Fix build of attribute plugin example on Windows

2020-09-02 Thread John Brawn via Phabricator via cfe-commits
john.brawn accepted this revision. john.brawn added a comment. This revision is now accepted and ready to land. LGTM (looks like the other example plugins just use PRIVATE as well). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86091/new/

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D86207#2252409 , @aaronpuchert wrote: > In D86207#2251802 , @riccibruno > wrote: > >> Is my comment on the deserialization of `BindingDecl`s in >>

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Rahman Lavaee via Phabricator via cfe-commits
rahmanl added a comment. Thanks a lot for the comments @MaskRay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85408/new/ https://reviews.llvm.org/D85408 ___ cfe-commits mailing list

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-02 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. @MaskRay Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Looks great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list

[PATCH] D85408: Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-02 Thread Rahman Lavaee via Phabricator via cfe-commits
rahmanl updated this revision to Diff 289498. rahmanl marked 5 inline comments as done. rahmanl added a comment. - Address @MaskRay's comments. - Rebase with upstream. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85408/new/

[PATCH] D85613: [clang] Look through bindings when checking whether a default argument references a local entity.

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:91 + auto CheckAndDiagnoseLocalEntity = [&](const VarDecl *VD, unsigned DiagID, + const auto &... DiagArgs) -> bool { +if (VD->isLocalVarDecl() &&

[PATCH] D86881: Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin

2020-09-02 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd46f2c51e4c8: Make -fvisibility-inlines-hidden apply to static local variables in inline… (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES

[clang] d46f2c5 - Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin

2020-09-02 Thread Erik Pilkington via cfe-commits
Author: Erik Pilkington Date: 2020-09-02T12:19:12-04:00 New Revision: d46f2c51e4c849683434bb5a0fb6164957474b8f URL: https://github.com/llvm/llvm-project/commit/d46f2c51e4c849683434bb5a0fb6164957474b8f DIFF:

[clang] 8ff44e6 - [IRGen] Fix an assert when __attribute__((used)) is used on an ObjC method

2020-09-02 Thread Erik Pilkington via cfe-commits
Author: Erik Pilkington Date: 2020-09-02T12:19:11-04:00 New Revision: 8ff44e644bb70dfb8decc397a42679df6e6f8ba1 URL: https://github.com/llvm/llvm-project/commit/8ff44e644bb70dfb8decc397a42679df6e6f8ba1 DIFF:

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D86207#2251802 , @riccibruno wrote: > Is my comment on the deserialization of `BindingDecl`s in > https://reviews.llvm.org/D85613?id=284364 related to this change? Not sure. The `FIXME` comment on the code is correct,

[PATCH] D86874: [analyzer] Fix ArrayBoundCheckerV2 false positive regarding size_t indexer

2020-09-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:226 + // No unsigned symbolic value can be less then a negative constant. + if (const auto SymbolicRoot = RootNonLoc.getAs()) +if

  1   2   >