Fix comment indentation before labels.
Before:
switch (x) {
// if 1, do f()
case 1:
f();
}
After:
switch (x) {
// if 1, do f()
case 1:
f();
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176953 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 79163a6..17aeaca 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -427,6 +427,11 @@
"default: {\n"
" // Do nothing.\n"
"}");
+ verifyFormat("switch (x) {\n"
+ "// if 1, do f()\n"
+ "case 1:\n"
+ " f();\n"
+ "}");
verifyGoogleFormat("switch (x) {\n"
" case 1:\n"