[PATCH] D149677: [clang][TypePrinter] Add option to skip over elaborated types

2023-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 519643. li.zhe.hua marked an inline comment as done. li.zhe.hua added a comment. Accept suggested edits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149677/new/ https://reviews.llvm.org/D149677 Files: c

[PATCH] D149677: [clang][TypePrinter] Add option to skip over elaborated types

2023-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added a comment. In D149677#4319646 , @aaron.ballman wrote: > Will this new printing policy be used in tree? Not initially, no. (I'm understanding "in tree" as "in the LLVM project".) Some additional context: I'm working on a refactoring too

[PATCH] D149677: [clang][TypePrinter] Add option to skip over elaborated types

2023-05-17 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added a comment. In D149677#4349523 , @aaron.ballman wrote: > In D149677#4320178 , @li.zhe.hua > wrote: > >> Some additional context: I'm working on a refactoring tool to, in part, >> deprecate an al

[PATCH] D149677: [clang][TypePrinter] Add option to skip over elaborated types

2023-05-02 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua created this revision. Herald added a project: All. li.zhe.hua requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Elaborated types are sugar that represent how the type was spelled in the original source. When printing a type outsid

[PATCH] D149677: [clang][TypePrinter] Add option to skip over elaborated types

2023-06-06 Thread Eric Li 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 rG3cb6ead77c66: [clang][TypePrinter] Add option to skip over elaborated types (authored by li.zhe.hua). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D139676: [libTooling] Add flag to getRangeForEdit to ignore macro expansions

2022-12-08 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua created this revision. li.zhe.hua added a reviewer: ymandel. Herald added a project: All. li.zhe.hua requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This commit resolves the FIXME around the behavior of `Lexer::makeFileCharRange`

[PATCH] D139676: [libTooling] Add flag to getRangeForEdit to ignore macro expansions

2022-12-08 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 481506. li.zhe.hua added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139676/new/ https://reviews.llvm.org/D139676 Files: clang/include/clang/Tooling/Transformer/SourceCode.h

[PATCH] D139676: [libTooling] Add flag to getRangeForEdit to ignore macro expansions

2022-12-08 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua marked 2 inline comments as done. li.zhe.hua added inline comments. Comment at: clang/lib/Tooling/Transformer/SourceCode.cpp:90-92 + Loc = Expansion.getExpansionLocStart(); + if (Loc.isFileID()) +return true; ymandel wrote: > can you

[PATCH] D139676: [libTooling] Add flag to getRangeForEdit to ignore macro expansions

2022-12-08 Thread Eric Li via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. li.zhe.hua marked an inline comment as done. Closed by commit rGa78d4b5ba716: [libTooling] Add flag to getRangeForEdit to ignore macro expansions (authored by li.zhe.hu

[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 meta

[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 https:/

[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: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCh

[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?) So,

[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/ https://reviews.llv

[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: clang

[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 w

[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: clang-tools-extra/clang-tidy/abseil/Clea

[PATCH] D120360: [libTooling] Generalize string explanation as templated 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/Transformer.h:103-108 + template >>::value, +int> = 0> asoffer wrote: > Given that we're simply passing this off to the NoMetadataImpl which accepts > a std::f

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

2022-03-03 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 412799. li.zhe.hua added a comment. Try removing all the SFINAE Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120360/new/ https://reviews.llvm.org/D120360 Files: clang-tools-extra/clang-tidy/abseil/Cleanu

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

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

[PATCH] D120360: [libTooling] Generalize string explanation as templated 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/Transformer.h:103-108 + template >>::value, +int> = 0> li.zhe.hua wrote: > asoffer wrote: > > Given that we're simply passing this off to the NoMetadataImpl whi

<    1   2