summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-06-19 08:17:32 +0000
committerDaniel Jasper <djasper@google.com>2015-06-19 08:17:32 +0000
commitf68ad12985dd957b0661f07a524b2645d33f41bc (patch)
treec86d4f722999521785af90ccfde32fa68ffbe412 /unittests
parenta07c2fc314cb918bc1c7b97f0675a4d6175635f3 (diff)
downloadclang-f68ad12985dd957b0661f07a524b2645d33f41bc.tar.gz
clang-format: Better fix to detect elaborated enum return types.
The previous one (r240021) regressed: enum E Type::f() { .. } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 418b7aceea..30bc5b2cd1 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -2029,6 +2029,10 @@ TEST_F(FormatTest, FormatsEnum) {
" a();\n"
" return 42;\n"
"}");
+ verifyFormat("enum X Type::f() {\n"
+ " a();\n"
+ " return 42;\n"
+ "}");
verifyFormat("enum ::X f() {\n"
" a();\n"
" return 42;\n"