From d39312ec8420cc9b862416f4f620710afb86f693 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Wed, 28 May 2014 10:09:11 +0000 Subject: clang-format: Don't break before a case's colon. Before (with just the right line length: switch (a) { case some_namespace::some_constant : return; } After: switch (a) { case some_namespace:: some_constant: return; } llvm-svn: 209725 --- clang/unittests/Format/FormatTest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 8ad59cd93e1..712af88329e 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -683,6 +683,13 @@ TEST_F(FormatTest, FormatsSwitchStatement) { "case (b):\n" " return;\n" "}"); + + verifyFormat("switch (a) {\n" + "case some_namespace::\n" + " some_constant:\n" + " return;\n" + "}", + getLLVMStyleWithColumns(34)); } TEST_F(FormatTest, CaseRanges) { -- cgit v1.2.3