iains added a comment. as suspected, we also have a missing diagnostic in 10.7 ex1
// RUN: rm -rf %t // RUN: split-file %s %t // RUN: cd %t // RUN: %clang_cc1 -std=c++20 -emit-module-interface std-10-7-ex1-M-A.cpp \ // RUN: -o M-A.pcm // RUN: %clang_cc1 -std=c++20 -emit-module-interface std-10-7-ex1-M-B.cpp \ // RUN: -o M-B.pcm // RUN: %clang_cc1 -std=c++20 -emit-module-interface std-10-7-ex1-M-C.cpp \ // RUN: -fmodule-file=M-A.pcm -verify -fsyntax-only // RUN: %clang_cc1 -std=c++20 -emit-module-interface std-10-7-ex1-M.cpp \ // RUN: -o M.pcm -fmodule-file=M-A.pcm -fmodule-file=M-B.pcm // RUN: %clang_cc1 -std=c++20 -emit-module-interface std-10-7-ex1-X.cpp \ // RUN: -o X.pcm // RUN: %clang_cc1 -std=c++20 std-10-7-ex1-use.cpp -fsyntax-only \ // RUN: -fmodule-file=M.pcm -fmodule-file=X.pcm -verify //--- std-10-7-ex1-M-A.cpp export module M:A; export struct B; //--- std-10-7-ex1-M-B.cpp module M:B; struct B { operator int(); }; //--- std-10-7-ex1-M-C.cpp module M:C; import :A; B b1; // expected-error {{variable has incomplete type 'B'}} // expected-n...@std-10-7-ex1-m-a.cpp:2 {{forward declaration of 'B'}} //--- std-10-7-ex1-M.cpp export module M; export import :A; import :B; B b2; export void f(B b = B()); //--- std-10-7-ex1-X.cpp export module X; //--- std-10-7-ex1-use.cpp module X; import M; B b3; // expected-error 1+{{definition of 'B' must be imported from module 'M:B' before it is required}} // expected-n...@std-10-7-ex1-m-b.cpp:2 1+{{definition here is not reachable}} void g() { f(); } // expected-error {{definition of 'B' must be imported from module 'M:B' before it is required}} // not sure of the actual diagnostic here ^ , it is not emitted. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits