[clang] fed71b0 - [NFC] Add an invalid test case for clang/test/CXX/module/module.reach/ex1.cpp

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 22:02:23 PDT 2022


Author: Chuanqi Xu
Date: 2022-08-31T13:02:00+08:00
New Revision: fed71b04fb3cc6b1a5a21f64c26104962d816300

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

LOG: [NFC] Add an invalid test case for clang/test/CXX/module/module.reach/ex1.cpp

Added: 
    

Modified: 
    clang/test/CXX/module/module.reach/ex1.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CXX/module/module.reach/ex1.cpp b/clang/test/CXX/module/module.reach/ex1.cpp
index 00f87607dc1d8..a1e38c4c88a28 100644
--- a/clang/test/CXX/module/module.reach/ex1.cpp
+++ b/clang/test/CXX/module/module.reach/ex1.cpp
@@ -41,3 +41,6 @@ B b3; // expected-error {{definition of 'B' must be imported from module 'M:B' b
       // expected-note@* {{definition here is not reachable}} expected-note@* {{}}
 // FIXME: We should emit an error for unreachable definition of B.
 void g() { f(); }
+void g1() { f(B()); } // expected-error 1+{{definition of 'B' must be imported from module 'M:B' before it is required}}
+                      // expected-note@* 1+{{definition here is not reachable}}
+                      // expected-note at M.cppm:5 {{passing argument to parameter 'b' here}}


        


More information about the cfe-commits mailing list