[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-06-03 Thread Andy Soffer via Phabricator via cfe-commits
asoffer added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnusedNoSideEffectCheck.cpp:90 +if (!Op->isAssignmentOp()) { + markSideEffectFree(Op->getRHS()); +} Perhaps I'm not understanding precisely what

[PATCH] D126888: Add a parameter to LoadFromASTFile that accepts a file system and defaults to the real file-system.

2022-06-02 Thread Andy Soffer via Phabricator via cfe-commits
asoffer created this revision. asoffer added a reviewer: ymandel. Herald added a project: All. asoffer requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D126888 Files:

[PATCH] D126806: Add an overload to ASTUnit::LoadFromASTFile that accepts a virtual file system.

2022-06-02 Thread Andy Soffer via Phabricator via cfe-commits
asoffer abandoned this revision. asoffer added a comment. I don't know what happened here, but when I update a diff half my changes disappear. I'm going to recreate this in a new diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126806/new/

[PATCH] D126806: Add an overload to ASTUnit::LoadFromASTFile that accepts a virtual file system.

2022-06-02 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 433747. asoffer added a comment. Use default arguments instead of overloads. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126806/new/ https://reviews.llvm.org/D126806 Files: clang/lib/Frontend/ASTUnit.cpp

[PATCH] D126881: Use default arguments instead of overloads.

2022-06-02 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 433745. asoffer added a comment. Remove non-existant overload from cpp file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126881/new/ https://reviews.llvm.org/D126881 Files: clang/lib/Frontend/ASTUnit.cpp

[PATCH] D126881: Use default arguments instead of overloads.

2022-06-02 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 433744. asoffer added a comment. Use default arguments instead of overloads. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126881/new/ https://reviews.llvm.org/D126881 Files:

[PATCH] D126881: Use default arguments instead of overloads.

2022-06-02 Thread Andy Soffer via Phabricator via cfe-commits
asoffer created this revision. Herald added a project: All. asoffer requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D126881 Files: clang/include/clang/Frontend/ASTUnit.h

[PATCH] D126806: Add an overload to ASTUnit::LoadFromASTFile that accepts a virtual file system.

2022-06-01 Thread Andy Soffer via Phabricator via cfe-commits
asoffer created this revision. Herald added a project: All. asoffer requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D126806 Files: clang/include/clang/Frontend/ASTUnit.h

[PATCH] D122920: [Clang][CodeGen]Fix __builtin_dump_struct missing record type field name

2022-04-25 Thread Andy Soffer via Phabricator via cfe-commits
asoffer added a comment. In D122920#3471865 , @yihanaa wrote: > In D122920#3471654 , @erichkeane > wrote: > >> @yihanaa : I'd suggest seeing the conversation that @rsmith @aaron.ballman >> and I are having

[PATCH] D120360: [libTooling] Generalize string explanation as templated metadata

2022-03-03 Thread Andy Soffer via Phabricator via cfe-commits
asoffer added inline comments. Comment at: clang/include/clang/Tooling/Transformer/Transformer.h:103-108 + template >>::value, +int> = 0> Given that we're simply passing this off to the NoMetadataImpl which accepts a std::function, I don't see

[PATCH] D116377: [libTooling] Adds more support for constructing object access expressions.

2022-01-07 Thread Andy Soffer via Phabricator via cfe-commits
asoffer added inline comments. Comment at: clang/lib/Tooling/Transformer/SourceCodeBuilders.cpp:73 + cxxRecordDecl(hasAnyName("::std::unique_ptr", "::std::shared_ptr")); + const auto QuacksLikeASmartPointer = cxxRecordDecl( +

[PATCH] D84310: [libTooling] Add assorted `EditGenerator` combinators.

2020-07-23 Thread Andy Soffer via Phabricator via cfe-commits
asoffer accepted this revision. asoffer added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:125 +/// not bound, then no edits are produced. +inline EditGenerator ifBound(std::string ID, ASTEdit

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-21 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 279572. asoffer added a comment. Construct types for default metadata explicitly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83820/new/ https://reviews.llvm.org/D83820 Files:

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-16 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 278611. asoffer marked an inline comment as done. asoffer added a comment. Typo fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83820/new/ https://reviews.llvm.org/D83820 Files:

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-16 Thread Andy Soffer via Phabricator via cfe-commits
asoffer marked an inline comment as done. asoffer added inline comments. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:93 + // Not all transformations will want or need to attach metadata and therefore + // sholud not be requierd to do so. AnyGenerator

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-16 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 278552. asoffer added a comment. Fix formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83820/new/ https://reviews.llvm.org/D83820 Files: clang/include/clang/Tooling/Transformer/RewriteRule.h

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-15 Thread Andy Soffer via Phabricator via cfe-commits
asoffer added inline comments. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:93 + // Not all transformations will want or need to attach metadata and therefore + // sholud not be requierd to do so. AnyGenerator Metadata = [](const

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-15 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 278315. asoffer marked 2 inline comments as done. asoffer added a comment. Typo fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83820/new/ https://reviews.llvm.org/D83820 Files:

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-15 Thread Andy Soffer via Phabricator via cfe-commits
asoffer marked 4 inline comments as done. asoffer added inline comments. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:92 TextGenerator Note; - llvm::Any Metadata; + AnyGenerator Metadata = [](const ast_matchers::MatchFinder::MatchResult &) { +return

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-15 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 278262. asoffer added a comment. Add comments describing why we provide defaults for Metadata generation and design of withMetadata function template. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83820/new/

[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.

2020-07-14 Thread Andy Soffer via Phabricator via cfe-commits
asoffer created this revision. asoffer added reviewers: gribozavr, ymandel. Herald added a project: clang. Herald added a subscriber: cfe-commits. Metadata is being changed from an llvm::Any to a MatchConsumer so that it's evaluation can be be dependent on on MatchResults passed in.

[PATCH] D82226: Add Metadata to Transformer tooling

2020-06-29 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 274183. asoffer added a comment. Signed-comparison issue in test fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82226/new/ https://reviews.llvm.org/D82226 Files:

[PATCH] D82226: Add Metadata to Transformer tooling

2020-06-29 Thread Andy Soffer via Phabricator via cfe-commits
asoffer added a comment. I'm not against a map, but I don't see the need for it right now. We don't have multiple stages that write to the same AtomicChange in any tool I'm aware of. Given that these are immutable after construction, I think just the Any is simpler. So long as we're willing to

[PATCH] D82226: Add Metadata to Transformer tooling

2020-06-25 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 273522. asoffer added a comment. Last diff was a mistake. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82226/new/ https://reviews.llvm.org/D82226 Files:

[PATCH] D82226: Add Metadata to Transformer tooling

2020-06-25 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 273520. asoffer marked an inline comment as done. asoffer added a comment. Updating other test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82226/new/ https://reviews.llvm.org/D82226 Files:

[PATCH] D82226: Add Metadata to Transformer tooling

2020-06-25 Thread Andy Soffer via Phabricator via cfe-commits
asoffer updated this revision to Diff 273516. asoffer marked an inline comment as done and an inline comment as not done. asoffer added a comment. Commenting fields and simplifying test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82226/new/

[PATCH] D82226: Add Metadata to Transformer tooling

2020-06-25 Thread Andy Soffer via Phabricator via cfe-commits
asoffer marked 2 inline comments as done. asoffer added a comment. In D82226#2114111 , @ymandel wrote: > Looks good! Only real question is one of design -- should we consider the > (deeper) change of templating the various types rather than using dynamic