diff options
author | Daniel Jasper <djasper@google.com> | 2013-03-20 15:12:38 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-03-20 15:12:38 +0000 |
commit | 6fe554eb4e7075cbfda927c4747d7346a27637f1 (patch) | |
tree | f983d0f725a89d9f03d05f6881b6e6faca4dfb3c /unittests/Format/FormatTest.cpp | |
parent | 83a90e5e6525acdb8cc4778ed102cd3952559f15 (diff) |
Fix infinite-loop in unwrapped line parser.
Discovered when accidentally formatting a python file :-).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 40f09539e7..2a3d66dfd7 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -2544,6 +2544,9 @@ TEST_F(FormatTest, UnderstandContextOfRecordTypeKeywords) { " 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) { |