2016-09-09 07:14:54 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify
|
2017-04-25 07:12:30 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify -DERRORS
|
2016-08-26 08:14:38 +08:00
|
|
|
|
2017-04-22 06:39:18 +08:00
|
|
|
export module foo;
|
2016-09-09 07:14:54 +08:00
|
|
|
#ifndef ERRORS
|
2016-08-26 08:14:38 +08:00
|
|
|
// expected-no-diagnostics
|
2016-09-09 07:14:54 +08:00
|
|
|
#else
|
2017-04-22 06:39:18 +08:00
|
|
|
// FIXME: diagnose missing module-declaration when building module interface
|
2016-08-26 08:14:38 +08:00
|
|
|
|
2016-09-09 07:14:54 +08:00
|
|
|
// FIXME: proclaimed-ownership-declarations?
|
|
|
|
|
|
|
|
export {
|
|
|
|
int a;
|
|
|
|
int b;
|
|
|
|
}
|
|
|
|
export int c;
|
|
|
|
|
|
|
|
namespace N {
|
|
|
|
export void f() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
export struct T {} t;
|
2016-08-26 08:14:38 +08:00
|
|
|
|
2016-09-09 07:14:54 +08:00
|
|
|
struct S {
|
|
|
|
export int n; // expected-error {{expected member name or ';'}}
|
|
|
|
export static int n; // expected-error {{expected member name or ';'}}
|
|
|
|
};
|
|
|
|
void f() {
|
|
|
|
export int n; // expected-error {{expected expression}}
|
|
|
|
}
|
2016-08-26 08:14:38 +08:00
|
|
|
#endif
|