Debian Codegraph @

clang/test/Modules/pr90154.cppm

raw
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/use.cc -fmodule-file=a=%t/a.pcm -fsyntax-only -verify
7 //
8 // Test again with reduced BMI
9 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm
10 // RUN: %clang_cc1 -std=c++20 %t/use.cc -fmodule-file=a=%t/a.pcm -fsyntax-only -verify
11
12 //--- a.cppm
13 export module a;
14 int b = 99;
15 namespace a { int a = 43; }
16
17 //--- use.cc
18 // expected-no-diagnostics
19 import a;
20
21 namespace a {
22 double a = 43.0;
23 }
24
25 int b = 883;