diff options
| author | Daniel Jasper <djasper@google.com> | 2014-05-28 10:09:11 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-05-28 10:09:11 +0000 |
| commit | d39312ec8420cc9b862416f4f620710afb86f693 (patch) | |
| tree | df5336b23acd7bb1e9eefa4723909b9b1826e934 /clang/unittests/Format/FormatTest.cpp | |
| parent | 0651b561a6e7e9b1b874520086ef430c4b309568 (diff) | |
| download | bcm5719-llvm-d39312ec8420cc9b862416f4f620710afb86f693.tar.gz bcm5719-llvm-d39312ec8420cc9b862416f4f620710afb86f693.zip | |
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
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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) { |

