diff options
author | Manuel Klimek <klimek@google.com> | 2013-11-20 11:20:32 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-11-20 11:20:32 +0000 |
commit | 06c84f2e071203e6a2acaa3ff0c1c30d63c9c063 (patch) | |
tree | d540796c0889382711d35b9ad48075c1fe84b7a6 /clang/unittests/Format/FormatTest.cpp | |
parent | 55758e9691410b9b3bee24f37e0255e93628e46c (diff) | |
download | bcm5719-llvm-06c84f2e071203e6a2acaa3ff0c1c30d63c9c063.tar.gz bcm5719-llvm-06c84f2e071203e6a2acaa3ff0c1c30d63c9c063.zip |
Fix bug where optimization would lead to strange line breaks.
Before:
void f() {
CHECK_EQ(aaaa, (
*bbbbbbbbb)->cccccc)
<< "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
}
After:
void f() {
CHECK_EQ(aaaa, (*bbbbbbbbb)->cccccc)
<< "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
}
llvm-svn: 195240
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index b6574c7503a..d9ca12996fa 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3744,6 +3744,11 @@ TEST_F(FormatTest, AlignsPipes) { EXPECT_EQ("llvm::errs() << \"\n" " << a;", format("llvm::errs() << \"\n<<a;")); + + verifyFormat("void f() {\n" + " CHECK_EQ(aaaa, (*bbbbbbbbb)->cccccc)\n" + " << \"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\";\n" + "}"); } TEST_F(FormatTest, UnderstandsEquals) { |