diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 463b9213a04..614e81e333a 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1782,6 +1782,21 @@ TEST_F(FormatTest, FormatsNamespaces) { "void f() { f(); }\n" "}", LLVMWithNoNamespaceFix); + verifyFormat("namespace N::inline D {\n" + "class A {};\n" + "void f() { f(); }\n" + "}", + LLVMWithNoNamespaceFix); + verifyFormat("namespace N::inline D::E {\n" + "class A {};\n" + "void f() { f(); }\n" + "}", + LLVMWithNoNamespaceFix); + verifyFormat("namespace [[deprecated(\"foo[bar\")]] some_namespace {\n" + "class A {};\n" + "void f() { f(); }\n" + "}", + LLVMWithNoNamespaceFix); verifyFormat("/* something */ namespace some_namespace {\n" "class A {};\n" "void f() { f(); }\n" |