summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-14 16:02:06 +0000
committerDaniel Jasper <djasper@google.com>2013-01-14 16:02:06 +0000
commit3e9218e50a96784dd014f202290e9569f7584b97 (patch)
tree63c15116269a5d7d7f2e1e18ee523a198dafbac3 /clang/unittests/Format/FormatTest.cpp
parent2ab0d01a8e2c7002478fa49f8aca4b32cc72b432 (diff)
downloadbcm5719-llvm-3e9218e50a96784dd014f202290e9569f7584b97.tar.gz
bcm5719-llvm-3e9218e50a96784dd014f202290e9569f7584b97.zip
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. llvm-svn: 172426
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index daebc4ddab1..8e55ddb5d0f 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud