[PATCH] D83820: Change metadata to deferred evalutaion in Clang Transformer.
Andy Soffer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 15 11:50:40 PDT 2020
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 llvm::Any();
----------------
ymandel wrote:
> Why default, especially when we don't default the others? Is it worth a comment?
Added comments.
================
Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:268
-inline ASTEdit withMetadata(ASTEdit edit, llvm::Any Metadata) {
- edit.Metadata = std::move(Metadata);
- return edit;
+// TODO(asoffer): If this returns an llvm::Expected, should we unwrap?
+template <typename Callable>
----------------
gribozavr2 wrote:
> What is "this" who is "we"? Should this be an implementation comment instead (in the function body next to the relevant line)?
Added comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83820/new/
https://reviews.llvm.org/D83820
More information about the cfe-commits
mailing list