[PATCH] D107291: [clang][lexer] adds a way for tokens to track their physical spelling
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 2 10:47:01 PDT 2021
cor3ntin added a comment.
A few questions, also for @aaron.ballman
Can we have a "isDigraph" flag instead of keeping a pointer for the spelling?
Do we maybe want to promote `and` etc to proper keywords and maybe add functions to check `isAndOrAmpAmp` ? so that we can in the future make `void f(auto and)` ill-formed in the committee?
This second solution is more long term and maybe the patch is good enough as an intermediate step
================
Comment at: clang/lib/Lex/Lexer.cpp:3594
Kind = tok::ampamp;
+ // Result.setSpelling(CurPtr - 1);
CurPtr = ConsumeChar(CurPtr, SizeTmp, Result);
----------------
Did you intend to remove these?
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