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 -Dmodule=int -DERRORS 3 4export module foo; 5#ifndef ERRORS 6// expected-no-diagnostics 7#else 8// FIXME: diagnose 'export' declaration in non-module 9// FIXME: diagnose missing module-declaration when building module interface 10 11// FIXME: proclaimed-ownership-declarations? 12 13export { 14 int a; 15 int b; 16} 17export int c; 18 19namespace N { 20 export void f() {} 21} 22 23export struct T {} t; 24 25struct S { 26 export int n; // expected-error {{expected member name or ';'}} 27 export static int n; // expected-error {{expected member name or ';'}} 28}; 29void f() { 30 export int n; // expected-error {{expected expression}} 31} 32#endif 33