| // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/foo.cppm -o %t/foo.pcm |
| // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only |
| // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/foo.cppm -o %t/foo.pcm |
| // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only -DREDUCED |
| # 3 __FILE__ 1 // use the next physical line number here (and below) |
| export template <typename T> |
| // In reduced BMI, the foo2 template function is optimized out. |
| foo2<short>(); // expected-error {{use of undeclared identifier 'foo2'}} |
| foo2<int>(); // expected-error {{use of undeclared identifier 'foo2'}} |
| foo2<short>(); // expected-error {{missing '#include'; 'foo2' must be declared before it is used}} |
| // expected-note@* {{declaration here is not visible}} |
| foo2<int>(); // expected-error {{missing '#include'; 'foo2' must be declared before it is used}} |
| // expected-note@* {{declaration here is not visible}} |