Debian Codegraph @

clang/test/Parser/cxx-modules-interface.cppm

raw
1 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -o %t.pcm -verify
2 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -o %t.pcm -verify -DERRORS
3
4 export module foo;
5 #ifndef ERRORS
6 // expected-no-diagnostics
7 #else
8 // FIXME: diagnose missing module-declaration when building module interface
9
10 // FIXME: proclaimed-ownership-declarations?
11
12 export {
13 int a;
14 int b;
15 }
16 export int c;
17
18 namespace N {
19 export void f() {}
20 } // namespace N
21
22 export struct T {
23 } t;
24
25 struct S {
26 export int n; // expected-error {{expected member name or ';'}}
27 export static int n; // expected-error {{expected member name or ';'}}
28 };
29 void f() {
30 export int n; // expected-error {{expected expression}}
31 }
32 #endif