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

2022-03-03 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 412755. li.zhe.hua added a comment. Fix use-after-move in asserts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120360/new/ https://reviews.llvm.org/D120360 Files:

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

2022-03-03 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added inline comments. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:300 /// Constructs a simple \c RewriteRule. RewriteRule makeRule(ast_matchers::internal::DynTypedMatcher M, + EditGenerator Edits); ymandel

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

2022-03-03 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 412746. li.zhe.hua marked 7 inline comments as done. li.zhe.hua added a comment. Fixes from comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120360/new/ https://reviews.llvm.org/D120360 Files:

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

2022-03-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Looks really good! Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:64 using TextGenerator = std::shared_ptr>; (and move down to

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

2022-03-01 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 412245. li.zhe.hua added a comment. Herald added a project: All. As discussed offline, switch to using a template instead of Any. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120360/new/

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

2022-02-23 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua marked an inline comment as done. li.zhe.hua added a comment. In D120360#3341118 , @ymandel wrote: > High level question: why use `Any` rather than templating? (Aside: Not sure how to "respond" to comments... just quote in a new comment?)

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

2022-02-23 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 410907. li.zhe.hua added a comment. Update alias Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120360/new/ https://reviews.llvm.org/D120360 Files:

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

2022-02-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. High level question: why use `Any` rather than templating? Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:68 +using AnyGenerator2 = std::shared_ptr>; + li.zhe.hua wrote: > Placeholder name; suggestions welcome.

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

2022-02-22 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added inline comments. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:68 +using AnyGenerator2 = std::shared_ptr>; + Placeholder name; suggestions welcome. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-02-22 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua created this revision. li.zhe.hua added a reviewer: ymandel. Herald added a subscriber: carlosgalvezp. li.zhe.hua requested review of this revision. Herald added projects: clang, clang-tools-extra. Change RewriteRule from holding an `Explanation` to being able to generate arbitrary