[PATCH] D107291: [clang][lexer] adds a way for tokens to track their physical spelling

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 2 10:52:35 PDT 2021


aaron.ballman added a comment.

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).


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