[clang] [NFC][clang] Update the diagnostic test of unexpected token after module name (PR #217987)
Yihan Wang via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 21 10:33:49 PDT 2026
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/217987
This PR fix the diagnostic test of unexpected token after module name. This diagnostic changed by https://github.com/llvm/llvm-project/pull/187846.
>From 9fd0db037ae3d0b1681207d733d6a79f9bd1e548 Mon Sep 17 00:00:00 2001
From: yronglin <yronglin777 at gmail.com>
Date: Fri, 21 Aug 2026 10:32:18 -0700
Subject: [PATCH] [NFC][clang] Update the diagnostic test of unexpected token
after module name
Signed-off-by: yronglin <yronglin777 at gmail.com>
---
clang/test/Modules/GH204633.cppm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/Modules/GH204633.cppm b/clang/test/Modules/GH204633.cppm
index 8651352013e67..b6f80e52f8a60 100644
--- a/clang/test/Modules/GH204633.cppm
+++ b/clang/test/Modules/GH204633.cppm
@@ -9,7 +9,7 @@
// parser accepts this as a Clang module definition, while the C++ parser
// diagnoses it as a malformed module declaration.
//--- original.cppm
-// expected-error at +3 {{unexpected preprocessing token '{' after module name}}
+// expected-error at +3 {{unexpected '{' after module name, only ';' and '[' (start of attribute specifier sequence) are allowed}}
// expected-error at +2 {{module directive must end with a ';'}}
// expected-error at +1 {{definition of module 'M' is not available}}
module M {}
More information about the cfe-commits
mailing list