================
@@ -35,9 +35,9 @@
// cwg2947: 23 tentatively ready 2026-03-06
//--- cwg2947_example1.cpp
-// #define DOT_BAR .bar
+// -D'DOT_BAR=.bar'
export module foo DOT_BAR; // error: expansion of DOT_BAR; does not begin with
; or [
-// expected-error@-1 {{unexpected preprocessing token '.' after module name,
only ';' and '[' (start of attribute specifier sequence) are allowed}}
+// expected-error@-1 {{unexpected preprocessing token '.' after module name;
expansion of 'DOT_BAR' is not part of module name}}
----------------
AaronBallman wrote:
I actually wonder if we want a different approach entirely. I think the current
diagnostic behavior is correct and reasonable, I think we might want a
different diagnostic entirely for this case. e.g., if we're processing a module
export and we see an identifier that would otherwise be a valid macro
expansion, we diagnose *that*. Because there's still a situation like:
https://godbolt.org/z/xh7EYeMca (note, we do diagnose the object-like macro
case explicitly: https://godbolt.org/z/zh6Ksbdr7)
https://github.com/llvm/llvm-project/pull/187748
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits