================
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -std=c++20 -fmodules -fsyntax-only -verify %s
+
+#pragma clang module build N // expected-error {{no matching '#pragma clang 
module endbuild'}}
+module N {}
+#pragma clang module contents
+#pragma clang module begin N // expected-error {{no matching '#pragma clang 
module end'}}
----------------
hongtaihu wrote:

Thanks, you are right. -verify is explicitly disabled for the nested module 
compilation, and the outer verifier ignores diagnostics from a different 
SourceManager, so the second expected-error was not actually checked.

I changed the test to capture stderr and use FileCheck for both the outer 
endbuild diagnostic and the nested module end diagnostic. I also verified that 
reverting the Sema fix makes the updated test reproduce the original assertion.


https://github.com/llvm/llvm-project/pull/225099
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to