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 | 1a32a61ad4aac06949f8750930eb353f72c59759 (patch) | |
tree | d41f8e2e297742cf2de4dcb649b927f049b3aec2 /clang/unittests/Format/FormatTest.cpp | |
parent | 6120bac6e69be46c062ed6e8fe89dc916d18b82f (diff) | |
download | bcm5719-llvm-1a32a61ad4aac06949f8750930eb353f72c59759.tar.gz bcm5719-llvm-1a32a61ad4aac06949f8750930eb353f72c59759.zip |
Fix infinite-loop in unwrapped line parser.
Discovered when accidentally formatting a python file :-).
llvm-svn: 177527
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 40f09539e7a..2a3d66dfd79 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/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) { |