| 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 -fsyntax-only -verify |
| 7 |
// |
| 8 |
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/a.pcm |
| 9 |
// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fprebuilt-module-path=%t -fsyntax-only -verify |
| 10 |
|
| 11 |
//--- A.cppm |
| 12 |
export module a; |
| 13 |
|
| 14 |
export auto f() { |
| 15 |
return [](){}; |
| 16 |
} |
| 17 |
|
| 18 |
//--- B.cppm |
| 19 |
// expected-no-diagnostics |
| 20 |
export module b; |
| 21 |
import a; |
| 22 |
|
| 23 |
static_assert(__is_convertible_to(decltype(f()), decltype(f()))); |