[clang] 9db8162 - [NFC] Format .cppm files in tests

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 13 07:32:55 PST 2021


Author: Chuanqi Xu
Date: 2021-12-13T23:32:25+08:00
New Revision: 9db8162820c49b2b9f17f3542b3cc2e05d8c00ea

URL: https://github.com/llvm/llvm-project/commit/9db8162820c49b2b9f17f3542b3cc2e05d8c00ea
DIFF: https://github.com/llvm/llvm-project/commit/9db8162820c49b2b9f17f3542b3cc2e05d8c00ea.diff

LOG: [NFC] Format .cppm files in tests

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 4266a4b510a49..a7f102759a0eb 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 86c67452aa148..61f13ce01925b 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 377733b61b255..af3f5c728378c 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 bb261700db84f..11052432d0adc 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 c1c726978a888..7ccf6de1f3761 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 0e7c746833534..cb63d1c699381 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 ae15c0825d1ab..64beb959edf20 100644
--- a/clang/test/SemaCXX/modules-ts.cppm
+++ b/clang/test/SemaCXX/modules-ts.cppm
@@ -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 at -13 {{declaration here is not visible}}
+// expected-note at -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


        


More information about the cfe-commits mailing list