[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)
Michael Spencer via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 2 14:46:30 PDT 2025
================
@@ -1778,10 +1778,20 @@ def ext_bit_int : Extension<
} // end of Parse Issue category.
let CategoryName = "Modules Issue" in {
-def err_unexpected_module_decl : Error<
- "module declaration can only appear at the top level">;
+def err_invalid_module_or_import_directive : Error<
+ "the %select{module|import}0 directive is ill-formed, "
+ "%select{module contextual keyword must be immediately "
+ "followed on the same line by an identifier, "
+ "or a ';' after being at the start of a line, or preceded by "
+ "an export keyword at the start of a line|"
+ "import contextual keyword must be immediately followed "
----------------
Bigcheese wrote:
I don't think `module` and `import` are technically contextual keywords. Although maybe it's ok to not be technically correct here.
https://github.com/llvm/llvm-project/pull/107168
More information about the cfe-commits
mailing list