[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

Michael Spencer via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 14:36:56 PDT 2024


================
@@ -932,6 +932,12 @@ def warn_module_conflict : Warning<
   InGroup<ModuleConflict>;
 
 // C++20 modules
+def err_module_decl_cannot_be_macros : Error<
+  "the name of a module%select{| partition}0 declaration cannot contains "
+  "an object-like macro %1, and the macro will not expand"
+  "%select{|; did you mean '%3'?}2">;
+def err_unxepected_paren_in_module_decl : Error<
+  "unexpected '(' after the name of a module%select{| partition}0 declaration">;
----------------
Bigcheese wrote:

"name of a module declaration" is a bit odd. I think "module name in a module declaration" is clearer.

```suggestion
def err_unxepected_paren_in_module_decl : Error<
  "unexpected '(' after the module name in a module%select{| partition}0 declaration">;
```

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


More information about the cfe-commits mailing list