1 // RUN: rm -rf %t 2 // RUN: mkdir -p %t 3 // RUN: split-file %s %t 4 // 5 // RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm 6 // RUN: %clang_cc1 -std=c++20 %t/B.cppm -fprebuilt-module-path=%t -emit-module-interface -o %t/B.pcm 7 // RUN: %clang_cc1 -fsyntax-only -std=c++20 -fprebuilt-module-path=%t -verify %t/C.cpp 8 9 //--- A.cppm 10 export module A; 11 export extern "C" void foo(struct Bar); 12 13 //--- B.cppm 14 module; 15 import A; 16 export module B; 17 18 //--- C.cpp 19 import B; 20 struct Bar {}; 21 void test() { 22 foo(Bar()); 23 // expected-error@-1 {{declaration of 'foo' must be imported}} 24 // expected-note@A.cppm:2 {{declaration here is not visible}} 25 } 26