diff options
author | Daniel Jasper <djasper@google.com> | 2013-11-23 14:45:49 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-11-23 14:45:49 +0000 |
commit | 446d1cd32ca5dcde8ca1d81c7c127ce659aa82c1 (patch) | |
tree | 6590c943448d9ccb883b5fb1de93224f28f3cf1e /clang/unittests/Format/FormatTest.cpp | |
parent | 9c6fb0f7848a7b18713daf3f711c2f040d3beaf2 (diff) | |
download | bcm5719-llvm-446d1cd32ca5dcde8ca1d81c7c127ce659aa82c1.tar.gz bcm5719-llvm-446d1cd32ca5dcde8ca1d81c7c127ce659aa82c1.zip |
clang-format: The "<" of a template argument is not a binary operator.
With Style.BreakBeforeBinaryOperators, clang-format breaks incorrectly.
This fixes llvm.org/PR17994.
Before:
return boost::fusion::at_c<0>(iiii).second == boost::fusion::at_c
<1>(iiii).second;
After:
return boost::fusion::at_c<0>(iiii).second ==
boost::fusion::at_c<1>(iiii).second;
llvm-svn: 195552
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 97444dde842..f279c272745 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2720,6 +2720,10 @@ TEST_F(FormatTest, ExpressionIndentationBreakingBeforeOperators) { " + sizeof(int32_t) // Offset of CU in the .debug_info section\n" " + sizeof(int8_t) // Pointer Size (in bytes)\n" " + sizeof(int8_t); // Segment Size (in bytes)"); + + verifyFormat("return boost::fusion::at_c<0>(iiii).second\n" + " == boost::fusion::at_c<1>(iiii).second;", + Style); } TEST_F(FormatTest, ConstructorInitializers) { |