clang-format: Fix incorrect function annotation detection.
Before:
MACRO(
abc).function() // wrap
<< abc;
After:
MACRO(abc).function() // wrap
<< abc;
llvm-svn: 265540
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 1107718..723e05f 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -3997,6 +3997,12 @@
" << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
verifyFormat("TEST_F(ThisIsATestFixtureeeeeeeeeeeee,\n"
" ThisIsATestWithAReallyReallyReallyReallyLongName) {}");
+ verifyFormat("MACRO(abc).function() // wrap\n"
+ " << abc;");
+ verifyFormat("MACRO(abc)->function() // wrap\n"
+ " << abc;");
+ verifyFormat("MACRO(abc)::function() // wrap\n"
+ " << abc;");
}
TEST_F(FormatTest, BreaksDesireably) {