[clang] Disable -fdollars-in-identifiers by default (PR #135407)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 04:18:20 PDT 2025
================
@@ -7,7 +7,7 @@
#define foo`bar /* expected-error {{whitespace required after macro name}} */
#define foo2!bar /* expected-warning {{whitespace recommended after macro name}} */
-#define foo3$bar /* expected-error {{'$' in identifier}} */
+#define foo3$bar /* expected-error {{whitespace required after macro name}} */
----------------
AaronBallman wrote:
In `-pedentic-errors` mode before the patch, dollar signs in identifiers are recognized and so we get `#` `define` `<identifier>` and issue the pedantic diagnostic. With the patch, dollar signs in identifiers are not recognized at all and so we get `#` `define` `foo` `$` `bar` which has no whitespace between the macro name and its replacement list.
https://github.com/llvm/llvm-project/pull/135407
More information about the cfe-commits
mailing list