diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-14 16:02:06 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-14 16:02:06 +0000 |
commit | fd0ca976bd55167364ba1178e884d275cc6ef30b (patch) | |
tree | 38f58d8aef44bd26b55196f1e97a34d3a0496539 /unittests/Format/FormatTest.cpp | |
parent | 2b9c10bd8f80c004756308a5163fa7eda27eb5ce (diff) |
Fix a bug in the line merging.
If the first line of a merge would exactly fit into the column limit,
an unsigned overflow made us not break.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index daebc4ddab..8e55ddb5d0 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -138,6 +138,8 @@ TEST_F(FormatTest, FormatIfWithoutCompountStatement) { " f();"); verifyFormat("if (a) return;", getLLVMStyleWithColumns(14)); verifyFormat("if (a)\n return;", getLLVMStyleWithColumns(13)); + verifyFormat("if (aaaaaaaaa)\n" + " return;", getLLVMStyleWithColumns(14)); } TEST_F(FormatTest, ParseIfElse) { |