[clang] 179b74a - [NFC][clang] Update the diagnostic test of unexpected token after module name (#217987)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 11:11:37 PDT 2026


Author: Yihan Wang
Date: 2026-08-21T18:11:32Z
New Revision: 179b74aea1134a557be16f8afcb40ad5c113a00d

URL: https://github.com/llvm/llvm-project/commit/179b74aea1134a557be16f8afcb40ad5c113a00d
DIFF: https://github.com/llvm/llvm-project/commit/179b74aea1134a557be16f8afcb40ad5c113a00d.diff

LOG: [NFC][clang] Update the diagnostic test of unexpected token after module name (#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.

Signed-off-by: yronglin <yronglin777 at gmail.com>

Added: 
    

Modified: 
    clang/test/Modules/GH204633.cppm

Removed: 
    


################################################################################
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