[libTooling] Add flag to getRangeForEdit to ignore macro expansions
This commit resolves the FIXME around the behavior of `Lexer::makeFileCharRange` that `getRangeForEdit` inherits around source locations in macro expansions. We add a flag to `getRangeForEdit` that allows a caller to disable the behavior, and instead uses the spelling location instead, with checks to ensure that the source locations are not within a macro definition. Differential Revision: https://reviews.llvm.org/D139676
Loading
Please sign in to comment