summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 2afd91e482f..6c70ebb11a7 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -2456,6 +2456,13 @@ TEST_F(FormatTest, BreaksFunctionDeclarations) {
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
" bbbb bbbb);");
+
+ // Treat overloaded operators like other functions.
+ verifyFormat("SomeLoooooooooooooooooooooooooogType\n"
+ "operator>(const SomeLoooooooooooooooooooooooooogType &other);");
+ verifyGoogleFormat(
+ "SomeLoooooooooooooooooooooooooooooogType operator<<(\n"
+ " const SomeLooooooooogType &a, const SomeLooooooooogType &b);");
}
TEST_F(FormatTest, BreaksFunctionDeclarationsWithTrailingTokens) {
OpenPOWER on IntegriCloud