diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 2 | ||||
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index cb07cb56a55..44116a8f8e3 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -623,7 +623,7 @@ private: AnnotatedLine &Line = **I; if (Line.First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_do, tok::r_brace, tok::kw_else, tok::kw_try, tok::kw_catch, - tok::kw_for, + tok::kw_for, tok::kw_case, // This gets rid of all ObjC @ keywords and methods. tok::at, tok::minus, tok::plus)) return 0; diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 76062605f70..90e6ff72037 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -511,6 +511,9 @@ TEST_F(FormatTest, FormatsSwitchStatement) { " f();\n" " break;\n" "}\n" + "case 2: {\n" + " break;\n" + "}\n" "}"); verifyFormat("switch (x) {\n" "case 1: {\n" |

