diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-10 21:15:07 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-10 21:15:07 +0000 |
commit | 173504e494e812198ad4d680548efa075fcbced8 (patch) | |
tree | fa283f080a972b4cbfdc703708423be18d98765f /clang/unittests/Format/FormatTest.cpp | |
parent | 382277421dfcedecd2ef736e70158ca861c26178 (diff) | |
download | bcm5719-llvm-173504e494e812198ad4d680548efa075fcbced8.tar.gz bcm5719-llvm-173504e494e812198ad4d680548efa075fcbced8.zip |
clang-format: Improve wrapping of << operators.
Before:
llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
After:
llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaa)
<< aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
Also, cleanup and simplify the operator wrapping logic.
llvm-svn: 236960
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index ce14165bc88..a70cab1096f 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4876,6 +4876,10 @@ TEST_F(FormatTest, AlignsPipes) { "}"); verifyFormat("llvm::outs() << \"aaaaaaaaaaaaaaaa: \"\n" " << aaaaaaaa.aaaaaaaaaaaa(aaa)->aaaaaaaaaaaaaa();"); + verifyFormat("llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n" + " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" + " aaaaaaaaaaaaaaaaaaaaa)\n" + " << aaaaaaaaaaaaaaaaaaaaaaaaaa;"); // Breaking before the first "<<" is generally not desirable. verifyFormat( |