[clang] Add tracking source deduction guide for the explicitly-written
[llvm-project.git] / clang / test / Modules / pcm-with-errors.cpp
blob1bbc3865ee3ee921fb20ed419ddc4f3cfa260cec
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: cd %t
5 // RUN: %clang_cc1 -std=c++23 m.cppm -emit-module-interface -o m.pcm -fallow-pcm-with-compiler-errors -verify
6 // RUN: %clang_cc1 -std=c++23 main.cpp -fmodule-file=m=m.pcm -verify -fallow-pcm-with-compiler-errors -verify
8 // RUN: %clang_cc1 -std=c++23 m.cppm -fmodules-reduced-bmi -emit-module-interface -o m.pcm -fallow-pcm-with-compiler-errors -verify
9 // RUN: %clang_cc1 -std=c++23 main.cpp -fmodule-file=m=m.pcm -verify -fallow-pcm-with-compiler-errors -verify
11 //--- m.cppm
12 export module m;
14 export int f() {
15 return 0;
18 export struct Foo {
19 __Int bar; // expected-error {{unknown type name '__Int'}}
22 //--- main.cpp
23 // expected-no-diagnostics
24 import m; // ok
26 static_assert(__is_same(decltype(f), int())); // ok