2 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface std-10-5-ex1-interface.cpp \
6 // RUN: -DBAD_FWD_DECL -fsyntax-only -verify
8 // RUN: %clang_cc1 -std=c++20 -emit-module-interface std-10-5-ex1-interface.cpp \
11 // RUN: %clang_cc1 -std=c++20 std-10-5-ex1-use.cpp -fmodule-file=A=A.pcm \
12 // RUN: -fsyntax-only -verify
14 //--- std-10-5-ex1-interface.cpp
18 export
inline void fn_e(); // expected-error {{inline function not defined before the private module fragment}}
19 // expected-note@std-10-5-ex1-interface.cpp:21 {{private module fragment begins here}}
21 export
inline void ok_fn() {}
22 export
inline void ok_fn2();
24 inline void fn_m(); // expected-error {{inline function not defined before the private module fragment}}
25 // expected-note@std-10-5-ex1-interface.cpp:21 {{private module fragment begins here}}
45 //--- std-10-5-ex1-use.cpp
50 X x
; // expected-error 1+{{missing '#include'; 'X' must be defined before it is used}}
51 // expected-note@std-10-5-ex1-interface.cpp:22 1+{{definition here is not reachable}}