isAllowedInitiallyIDChar is only used with non-ASCII codepoints,
which are handled by isAsciiIdentifierStart.
To make that clearer, remove the check for _ from
isAllowedInitiallyIDChar, and assert on ASCII - to ensure neither
_ or $ are passed to this function.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The change is fine by me, but you should put NFC in the patch title so it's more clear that this is simplifying code in a way that won't change behavior (and doesn't need tests).
clang/lib/Lex/Lexer.cpp | ||
---|---|---|
1486 | nit: 80-col limit Also, shouldn't this say it was called with an ASCII codepoint? |
clang/lib/Lex/Lexer.cpp | ||
---|---|---|
1486 | It should. I started with "isAllowedInitiallyIDChar should not be called with a non-ASCII codepoint") and... yeah, thanks for catching that! |
nit: 80-col limit
Also, shouldn't this say it was called with an ASCII codepoint?