2 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 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 // Test again with reduced BMI.
16 // RUN: %clang_cc1 -std=c++20 std-10-5-ex1-interface.cpp \
17 // RUN: -DBAD_FWD_DECL -fsyntax-only -verify
19 // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface std-10-5-ex1-interface.cpp \
22 // RUN: %clang_cc1 -std=c++20 std-10-5-ex1-use.cpp -fmodule-file=A=A.pcm \
23 // RUN: -fsyntax-only -verify
26 //--- std-10-5-ex1-interface.cpp
30 export
inline void fn_e(); // expected-error {{inline function not defined before the private module fragment}}
31 // expected-note@std-10-5-ex1-interface.cpp:21 {{private module fragment begins here}}
33 export
inline void ok_fn() {}
34 export
inline void ok_fn2();
36 inline void fn_m(); // expected-error {{inline function not defined before the private module fragment}}
37 // expected-note@std-10-5-ex1-interface.cpp:21 {{private module fragment begins here}}
57 //--- std-10-5-ex1-use.cpp
62 X x
; // expected-error 1+{{missing '#include'; 'X' must be defined before it is used}}
63 // expected-note@std-10-5-ex1-interface.cpp:22 1+{{definition here is not reachable}}