forked from OSchip/llvm-project
[NFC] Format .cppm files in tests
This commit is contained in:
parent
7c1d4c2e77
commit
9db8162820
|
@ -4,4 +4,4 @@ export module Y;
|
|||
export namespace foo {
|
||||
// We need to export something at least
|
||||
void print();
|
||||
}
|
||||
} // namespace foo
|
||||
|
|
|
@ -8,7 +8,7 @@ export module X;
|
|||
import Y;
|
||||
|
||||
export namespace foo {
|
||||
namespace bar{
|
||||
void baz();
|
||||
}
|
||||
namespace bar {
|
||||
void baz();
|
||||
}
|
||||
} // namespace foo
|
||||
|
|
|
@ -4,5 +4,5 @@ export module X;
|
|||
|
||||
extern "C++" class CPP {
|
||||
public:
|
||||
void print() {}
|
||||
void print() {}
|
||||
};
|
||||
|
|
|
@ -13,8 +13,8 @@ static void internal_linkage_fn() {}
|
|||
export struct external_linkage_class {};
|
||||
struct module_linkage_class {};
|
||||
namespace {
|
||||
struct internal_linkage_class {};
|
||||
}
|
||||
struct internal_linkage_class {};
|
||||
} // namespace
|
||||
|
||||
void use() {
|
||||
external_linkage_fn();
|
||||
|
|
|
@ -9,7 +9,7 @@ export {
|
|||
}
|
||||
|
||||
// CHECK-DAG: define weak_odr void @_ZW6FooBarE2f2v(
|
||||
inline void f2() { }
|
||||
inline void f2() {}
|
||||
|
||||
// CHECK-DAG: define{{.*}} void @_ZW6FooBarE2f3v(
|
||||
static void f3() {}
|
||||
|
|
|
@ -16,13 +16,14 @@ export {
|
|||
export int c;
|
||||
|
||||
namespace N {
|
||||
export void f() {}
|
||||
}
|
||||
export void f() {}
|
||||
} // namespace N
|
||||
|
||||
export struct T {} t;
|
||||
export struct T {
|
||||
} t;
|
||||
|
||||
struct S {
|
||||
export int n; // expected-error {{expected member name or ';'}}
|
||||
export int n; // expected-error {{expected member name or ';'}}
|
||||
export static int n; // expected-error {{expected member name or ';'}}
|
||||
};
|
||||
void f() {
|
||||
|
|
|
@ -37,22 +37,23 @@ export {
|
|||
export int c;
|
||||
|
||||
namespace N {
|
||||
export void f() {}
|
||||
}
|
||||
export void f() {}
|
||||
} // namespace N
|
||||
|
||||
export struct T {} t;
|
||||
export struct T {
|
||||
} t;
|
||||
#elif TEST == 3
|
||||
int use_a = a; // expected-error {{declaration of 'a' must be imported from module 'foo' before it is required}}
|
||||
// expected-note@-13 {{declaration here is not visible}}
|
||||
// expected-note@-14 {{declaration here is not visible}}
|
||||
|
||||
#undef foo
|
||||
import foo;
|
||||
|
||||
export {} // expected-error {{export declaration cannot be empty}}
|
||||
export { // expected-note {{begins here}}
|
||||
; // expected-warning {{ISO C++20 does not permit an empty declaration to appear in an export block}}
|
||||
export { // expected-note {{begins here}}
|
||||
; // expected-warning {{ISO C++20 does not permit an empty declaration to appear in an export block}}
|
||||
}
|
||||
export { // expected-note {{begins here}}
|
||||
export { // expected-note {{begins here}}
|
||||
static_assert(true); // expected-warning {{ISO C++20 does not permit a static_assert declaration to appear in an export block}}
|
||||
}
|
||||
|
||||
|
@ -63,10 +64,9 @@ extern int n;
|
|||
static_assert(&n != p);
|
||||
#endif
|
||||
|
||||
|
||||
#if TEST == 1
|
||||
struct S {
|
||||
export int n; // expected-error {{expected member name or ';'}}
|
||||
export int n; // expected-error {{expected member name or ';'}}
|
||||
export static int n; // expected-error {{expected member name or ';'}}
|
||||
};
|
||||
#endif
|
||||
|
@ -80,11 +80,11 @@ struct S {
|
|||
#if TEST == 1
|
||||
export { // expected-note {{export block begins here}}
|
||||
extern "C++" {
|
||||
namespace NestedExport {
|
||||
export { // expected-error {{appears within another export}}
|
||||
int q;
|
||||
}
|
||||
}
|
||||
namespace NestedExport {
|
||||
export { // expected-error {{appears within another export}}
|
||||
int q;
|
||||
}
|
||||
} // namespace NestedExport
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue