diff options
| author | Daniel Jasper <djasper@google.com> | 2013-08-28 07:27:35 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-08-28 07:27:35 +0000 |
| commit | d215b8bde2137c4856c11cbe76864cddd63e5b3e (patch) | |
| tree | 31a59dcdf5ea915aed23b163950b0ba1372168cd /clang/unittests/Format/FormatTest.cpp | |
| parent | 11be8ac5905373be3cac0dc65346edd81177412b (diff) | |
| download | bcm5719-llvm-d215b8bde2137c4856c11cbe76864cddd63e5b3e.tar.gz bcm5719-llvm-d215b8bde2137c4856c11cbe76864cddd63e5b3e.zip | |
clang-format: Fix corner case in overloaded operator definitions.
Before:
SomeLoooooooooooooooooooooooooogType operator>
>(const SomeLooooooooooooooooooooooooogType &other);
SomeLoooooooooooooooooooooooooogType // break
operator>>(const SomeLooooooooooooooooooooooooogType &other);
After:
SomeLoooooooooooooooooooooooooogType
operator>>(const SomeLooooooooooooooooooooooooogType &other);
SomeLoooooooooooooooooooooooooogType // break
operator>>(const SomeLooooooooooooooooooooooooogType &other);
This fixes llvm.org/PR16328.
llvm-svn: 189450
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5002c9ce804..51ada26a206 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2610,6 +2610,8 @@ TEST_F(FormatTest, BreaksFunctionDeclarations) { // Treat overloaded operators like other functions. verifyFormat("SomeLoooooooooooooooooooooooooogType\n" "operator>(const SomeLoooooooooooooooooooooooooogType &other);"); + verifyFormat("SomeLoooooooooooooooooooooooooogType\n" + "operator>>(const SomeLooooooooooooooooooooooooogType &other);"); verifyGoogleFormat( "SomeLoooooooooooooooooooooooooooooogType operator<<(\n" " const SomeLooooooooogType &a, const SomeLooooooooogType &b);"); |

