brintos

brintos / llvm-project-archived public Read only

0
0
Text · 781 B · 1bbc386 Raw
27 lines · cpp
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4 5// RUN: %clang_cc1 -std=c++23 m.cppm -emit-module-interface -o m.pcm -fallow-pcm-with-compiler-errors -verify6// RUN: %clang_cc1 -std=c++23 main.cpp -fmodule-file=m=m.pcm -verify -fallow-pcm-with-compiler-errors -verify7 8// RUN: %clang_cc1 -std=c++23 m.cppm -fmodules-reduced-bmi -emit-module-interface -o m.pcm -fallow-pcm-with-compiler-errors -verify9// RUN: %clang_cc1 -std=c++23 main.cpp -fmodule-file=m=m.pcm -verify -fallow-pcm-with-compiler-errors -verify10 11//--- m.cppm12export module m;13 14export int f() {15  return 0;16}17 18export struct Foo {19  __Int bar; // expected-error {{unknown type name '__Int'}}20};21 22//--- main.cpp23// expected-no-diagnostics24import m; // ok25 26static_assert(__is_same(decltype(f), int())); // ok27