[PATCH] D139676: [libTooling] Add flag to getRangeForEdit to ignore macro expansions
Eric Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 8 19:36:28 PST 2022
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 comment on the logic here? Why isn't this just "return true", since it's in a macro but not a part of a macro arg, I'd think it must be part of a macro definition.
Good catch, it should just return true.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139676/new/
https://reviews.llvm.org/D139676
More information about the cfe-commits
mailing list