diff options
-rw-r--r-- | lib/Format/Format.cpp | 1 | ||||
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index e3f7b4b2e2..18a853f1e4 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -999,6 +999,7 @@ public: if (FormatTok.Tok.is(tok::greatergreater)) { FormatTok.Tok.setKind(tok::greater); + FormatTok.TokenLength = 1; GreaterStashed = true; } diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 929e3c20ba..cc68bcb947 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -2002,6 +2002,8 @@ TEST_F(FormatTest, BreaksLongDeclarations) { verifyGoogleFormat("template <typename T>\n" "aaaaaaaa::aaaaa::aaaaaa<T, aaaaaaaaaaaaaaaaaaaaaaaaa>\n" "aaaaaaaaaaaaaaaaaaaaaaaa<T>::aaaaaaa() {}"); + verifyGoogleFormat("A<A<A>> aaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" + " int aaaaaaaaaaaaaaaaaaaaaaa);"); } TEST_F(FormatTest, LineStartsWithSpecialCharacter) { |