1// RUN:     %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify
2// RUN:     %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify -DERRORS
3
4export 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
12export {
13  int a;
14  int b;
15}
16export int c;
17
18namespace N {
19  export void f() {}
20}
21
22export struct T {} t;
23
24struct S {
25  export int n; // expected-error {{expected member name or ';'}}
26  export static int n; // expected-error {{expected member name or ';'}}
27};
28void f() {
29  export int n; // expected-error {{expected expression}}
30}
31#endif
32