aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-04-05 17:21:59 +0000
committerDaniel Jasper <djasper@google.com>2013-04-05 17:21:59 +0000
commit27b91cc046f580fbe825f15b3e27f1b6407ee3e3 (patch)
treeefaea43690f511775f9bac2c02ed219767e21444 /unittests
parent3a163318526e7bfaa6012b411934728e2954047e (diff)
Fix bad formatting of overloaded operator definitions.
Before: bool operator< (const aaaaaaaaaaaaaaaaaaaaa &left, const aaaaaaaaaaaaaaaaaaaaa &right) { return left.group < right.group; } After: bool operator<(const aaaaaaaaaaaaaaaaaaaaa &left, const aaaaaaaaaaaaaaaaaaaaa &right) { return left.group < right.group; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index e01034b09a..54e7381207 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -2226,6 +2226,10 @@ TEST_F(FormatTest, UndestandsOverloadedOperators) {
verifyFormat(
"ostream &operator<<(ostream &OutputStream,\n"
" SomeReallyLongType WithSomeReallyLongValue);");
+ verifyFormat("bool operator<(const aaaaaaaaaaaaaaaaaaaaa &left,\n"
+ " const aaaaaaaaaaaaaaaaaaaaa &right) {\n"
+ " return left.group < right.group;\n"
+ "}");
verifyGoogleFormat("operator void*();");
verifyGoogleFormat("operator SomeType<SomeType<int>>();");