We would like to use NumericLiteralParser in the implementation of the
syntax tree builder, and plumbing a preprocessor there seems
inconvenient and superfluous.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Additionally, consider applying a similar change to CharLiteralParser, for consistency.
All the comments are just suggestions. Feel free to land this without answering them.
clang/include/clang/Lex/LiteralSupport.h | ||
---|---|---|
57–59 | We don't need to remove this constructor, we can keep the same signature and make it call the new constructor. The same is done for StringLiteralParser. That would allow some callers that don't care much about the implementation details to just use the simpler to write version. | |
clang/lib/Lex/LiteralSupport.cpp | ||
770 | How about just using Lexer::AdvanceToTokenCharacter? |
We don't need to remove this constructor, we can keep the same signature and make it call the new constructor. The same is done for StringLiteralParser.
That would allow some callers that don't care much about the implementation details to just use the simpler to write version.