[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 09:32:09 PDT 2019
ymandel added a comment.
I'm having second thoughts about this -- I prefer the approach I ended up taking in https://reviews.llvm.org/D66676, which is subtly different.
However, getRuleMatchLoc() will be useful a different purpose: when only reporting a diagnostic, with no corresponding changes. So, I plan to rework this into two revisions: one to match https://reviews.llvm.org/D66676 (and keep the tests esssentially as they are) and one to add getRuleMatchLoc for future use. I can also make both changes in the same revision, if you prefer.
================
Comment at: clang/lib/Tooling/Refactoring/Transformer.cpp:197
// Verify the existence and validity of the AST node that roots this rule.
+ SourceLocation RootLoc = tooling::detail::getRuleMatchLoc(Result);
----------------
gribozavr wrote:
> This comment was moved into the function and now looks out of place here.
removed in both places. Even in the function, it didn't add anything meaningful to the assert() itself.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66652/new/
https://reviews.llvm.org/D66652
More information about the cfe-commits
mailing list