Skip to content

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

Merged
yronglin merged 1 commit into
llvm:mainfrom
yronglin:fix_diag_for_cpp_modules
Aug 21, 2026
Merged

[NFC][clang] Update the diagnostic test of unexpected token after module name#217987
yronglin merged 1 commit into
llvm:mainfrom
yronglin:fix_diag_for_cpp_modules

Conversation

@yronglin

Copy link
Copy Markdown
Contributor

This PR fix the diagnostic test of unexpected token after module name. This diagnostic changed by #187846.

…ule name

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

TPPPP72 commented Aug 21, 2026

Copy link
Copy Markdown
Member

I was just wondering why the module tests were failing (;; ̄▽ ̄)

@yronglin
yronglin merged commit 179b74a into llvm:main Aug 21, 2026
11 of 13 checks passed
@llvmorg-github-actions llvmorg-github-actions Bot added clang Clang issues not falling into any other category clang:modules C++20 modules and Clang Header Modules labels Aug 21, 2026
@llvmorg-github-actions

llvmorg-github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

@llvm/pr-subscribers-clang-modules

@llvm/pr-subscribers-clang

Author: Yihan Wang (yronglin)

Changes

This PR fix the diagnostic test of unexpected token after module name. This diagnostic changed by #187846.


Full diff: https://github.com/llvm/llvm-project/pull/217987.diff

1 Files Affected:

  • (modified) clang/test/Modules/GH204633.cppm (+1-1)
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@+3 {{unexpected preprocessing token '{' after module name}}
+// expected-error@+3 {{unexpected '{' after module name, only ';' and '[' (start of attribute specifier sequence) are allowed}}
 // expected-error@+2 {{module directive must end with a ';'}}
 // expected-error@+1 {{definition of module 'M' is not available}}
 module M {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:modules C++20 modules and Clang Header Modules clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants