[PATCH] D107291: [clang][lexer] adds a way for tokens to track their physical spelling
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 2 11:14:28 PDT 2021
cjdb abandoned this revision.
cjdb added a comment.
In D107291#2920408 <https://reviews.llvm.org/D107291#2920408>, @aaron.ballman wrote:
> You should always be able to go back to the token's spelling through the `SourceManager` object. Is there a reason why `SourceManager::getCharacterData()` is insufficient? I'm a bit worried about adding another pointer to `Token` because we sometimes store these in containers (like we do for cached tokens), so the overhead might be noticeable (or it might not, I don't know).
I found it very strange that there wasn't already a way for me to do this. Thanks, I've abandoned this patch and will adjust the dependents accordingly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107291/new/
https://reviews.llvm.org/D107291
More information about the cfe-commits
mailing list