| // https://github.com/llvm/llvm-project/issues/60890 |
| // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm |
| // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/b.cppm -fprebuilt-module-path=%t -o %t/b.pcm |
| // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/c.cppm -fprebuilt-module-path=%t -o %t/c.pcm |
| // RUN: %clang_cc1 -std=c++20 %t/d.cpp -fprebuilt-module-path=%t -emit-llvm-only |
| // Test again with reduced BMI |
| // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/a.cppm -o %t/a.pcm |
| // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/b.cppm -fprebuilt-module-path=%t -o %t/b.pcm |
| // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/c.cppm -fprebuilt-module-path=%t -o %t/c.pcm |
| // RUN: %clang_cc1 -std=c++20 %t/d.cpp -fprebuilt-module-path=%t -emit-llvm-only |
| export template<typename T> |
| friend void aa(a x) requires(true) {} |
| void aaa() requires(true) {} |
| export template struct a<double>; |
| export template<typename T> |
| void foo(T) requires(true) {} |
| export template void foo<double>(double); |
| export template <typename T> |
| // expected-no-diagnostics |