[clang] Disable -fdollars-in-identifiers by default (PR #135407)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 11 13:03:59 PDT 2025


https://github.com/efriedma-quic commented:

If we're going to do this, I think we need better diagnostics.  Just straight disabling this is going to give very confusing diagnostics to anyone actually using dollar-signs in identifiers.

Some ideas: 

- We can give a warning if we see a "$" adjacent to an identifier without any whitespace separating it.
- Outside the preprocessor, we can parse a "$" adjacent to an identifier as part of the identifier, with some sort of diagnostic, since it's guaranteed to be an error anyway.

https://github.com/llvm/llvm-project/pull/135407


More information about the cfe-commits mailing list