[clang] 7c51a12 - [NFC] format .cppm files in test
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 13 03:52:50 PST 2021
Author: Chuanqi Xu
Date: 2021-12-13T19:52:31+08:00
New Revision: 7c51a128339184c64307f3862e4cd36bf996189b
URL: https://github.com/llvm/llvm-project/commit/7c51a128339184c64307f3862e4cd36bf996189b
DIFF: https://github.com/llvm/llvm-project/commit/7c51a128339184c64307f3862e4cd36bf996189b.diff
LOG: [NFC] format .cppm files in test
Added:
Modified:
clang/test/CXX/basic/basic.namespace/basic.namespace.general/Inputs/p2.cppm
clang/test/CXX/basic/basic.namespace/basic.namespace.general/p2.cppm
clang/test/CXX/module/module.unit/p7/Inputs/CPP.cppm
clang/test/CXX/modules-ts/basic/basic.link/p2/module.cppm
clang/test/CXX/modules-ts/codegen-basics.cppm
clang/test/Parser/cxx-modules-interface.cppm
clang/test/SemaCXX/modules-ts.cppm
Removed:
################################################################################
diff --git a/clang/test/CXX/basic/basic.namespace/basic.namespace.general/Inputs/p2.cppm b/clang/test/CXX/basic/basic.namespace/basic.namespace.general/Inputs/p2.cppm
index 4266a4b510a4..a7f102759a0e 100644
--- a/clang/test/CXX/basic/basic.namespace/basic.namespace.general/Inputs/p2.cppm
+++ b/clang/test/CXX/basic/basic.namespace/basic.namespace.general/Inputs/p2.cppm
@@ -4,4 +4,4 @@ export module Y;
export namespace foo {
// We need to export something at least
void print();
-}
+} // namespace foo
diff --git a/clang/test/CXX/basic/basic.namespace/basic.namespace.general/p2.cppm b/clang/test/CXX/basic/basic.namespace/basic.namespace.general/p2.cppm
index 86c67452aa14..61f13ce01925 100644
--- a/clang/test/CXX/basic/basic.namespace/basic.namespace.general/p2.cppm
+++ b/clang/test/CXX/basic/basic.namespace/basic.namespace.general/p2.cppm
@@ -8,7 +8,7 @@ export module X;
import Y;
export namespace foo {
-namespace bar{
- void baz();
-}
+namespace bar {
+void baz();
}
+} // namespace foo
diff --git a/clang/test/CXX/module/module.unit/p7/Inputs/CPP.cppm b/clang/test/CXX/module/module.unit/p7/Inputs/CPP.cppm
index 377733b61b25..af3f5c728378 100644
--- a/clang/test/CXX/module/module.unit/p7/Inputs/CPP.cppm
+++ b/clang/test/CXX/module/module.unit/p7/Inputs/CPP.cppm
@@ -4,5 +4,5 @@ export module X;
extern "C++" class CPP {
public:
- void print() {}
+ void print() {}
};
diff --git a/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cppm b/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cppm
index bb261700db84..11052432d0ad 100644
--- a/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cppm
+++ b/clang/test/CXX/modules-ts/basic/basic.link/p2/module.cppm
@@ -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();
diff --git a/clang/test/CXX/modules-ts/codegen-basics.cppm b/clang/test/CXX/modules-ts/codegen-basics.cppm
index c1c726978a88..7ccf6de1f376 100644
--- a/clang/test/CXX/modules-ts/codegen-basics.cppm
+++ b/clang/test/CXX/modules-ts/codegen-basics.cppm
@@ -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() {}
diff --git a/clang/test/Parser/cxx-modules-interface.cppm b/clang/test/Parser/cxx-modules-interface.cppm
index 0e7c74683353..cb63d1c69938 100644
--- a/clang/test/Parser/cxx-modules-interface.cppm
+++ b/clang/test/Parser/cxx-modules-interface.cppm
@@ -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() {
diff --git a/clang/test/SemaCXX/modules-ts.cppm b/clang/test/SemaCXX/modules-ts.cppm
index ae15c0825d1a..f3db369f4b97 100644
--- a/clang/test/SemaCXX/modules-ts.cppm
+++ b/clang/test/SemaCXX/modules-ts.cppm
@@ -37,10 +37,11 @@ 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 at -13 {{declaration here is not visible}}
@@ -49,10 +50,10 @@ int use_a = a; // expected-error {{declaration of 'a' must be imported from modu
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
More information about the cfe-commits
mailing list