Fix infinite-loop in unwrapped line parser.
Discovered when accidentally formatting a python file :-).
llvm-svn: 177527
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 40f0953..2a3d66d 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -2544,6 +2544,9 @@
" class X x;\n"
"else\n"
" f();\n");
+
+ // This is simply incomplete. Formatting is not important, but must not crash.
+ verifyFormat("class A:");
}
TEST_F(FormatTest, DoNotInterfereWithErrorAndWarning) {