AaronBallman wrote: > If you don't want to do anything fancy, can you just add a warning in > Lexer::LexTokenInternal if we see a '$' (where we set the token type to > tok::unknown)? That should be easy to implement, and have zero impact on > lexer performance.
Okay, that's pretty reasonable. Note, we only emit the diagnostic when finding `$` at the *start* of an identifier, not as a continuation character. Otherwise we'd issue two diagnostics for `foo$bar`, one for finding the continuation character and one for finding the start of the next token. I added test coverage to be sure we caught `$a`, `a$`, and `a$b` correctly. https://github.com/llvm/llvm-project/pull/135407 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits