diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 | ||||
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 8229471071c..98f5709b906 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -925,7 +925,7 @@ private: Current.Type = TT_CastRParen; if (Current.MatchingParen && Current.Next && !Current.Next->isBinaryOperator() && - !Current.Next->isOneOf(tok::semi, tok::colon)) + !Current.Next->isOneOf(tok::semi, tok::colon, tok::l_brace)) if (FormatToken *BeforeParen = Current.MatchingParen->Previous) if (BeforeParen->is(tok::identifier) && BeforeParen->TokenText == BeforeParen->TokenText.upper() && diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index ca50be98fe3..1c100c3b9b0 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4064,6 +4064,8 @@ TEST_F(FormatTest, FunctionAnnotations) { // Not function annotations. verifyFormat("ASSERT(\"aaaaa\") << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n" " << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); + verifyFormat("TEST_F(ThisIsATestFixtureeeeeeeeeeeee,\n" + " ThisIsATestWithAReallyReallyReallyReallyLongName) {}"); } TEST_F(FormatTest, BreaksDesireably) { |

