Author: Nico Weber Date: 2021-12-13T07:13:17-05:00 New Revision: 45158b18041584e0056f85c04057d5098956257d
URL: https://github.com/llvm/llvm-project/commit/45158b18041584e0056f85c04057d5098956257d DIFF: https://github.com/llvm/llvm-project/commit/45158b18041584e0056f85c04057d5098956257d.diff LOG: Revert "[NFC] format .cppm files in test" This reverts commit 7c51a128339184c64307f3862e4cd36bf996189b. Breaks SemaCXX/modules-ts.cppm in check-clang. 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 a7f102759a0e..4266a4b510a4 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 61f13ce01925..86c67452aa14 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 af3f5c728378..377733b61b25 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 11052432d0ad..bb261700db84 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 {}; -} // namespace + struct internal_linkage_class {}; +} 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 7ccf6de1f376..c1c726978a88 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 cb63d1c69938..0e7c74683353 100644 --- a/clang/test/Parser/cxx-modules-interface.cppm +++ b/clang/test/Parser/cxx-modules-interface.cppm @@ -16,14 +16,13 @@ export { export int c; namespace N { -export void f() {} -} // namespace N + export void f() {} +} -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 f3db369f4b97..ae15c0825d1a 100644 --- a/clang/test/SemaCXX/modules-ts.cppm +++ b/clang/test/SemaCXX/modules-ts.cppm @@ -37,11 +37,10 @@ export { export int c; namespace N { -export void f() {} -} // namespace N + export void f() {} +} -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}} @@ -50,10 +49,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}} } @@ -64,9 +63,10 @@ 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 + namespace NestedExport { + export { // expected-error {{appears within another export}} + int q; + } + } } } #endif _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits