Index: lib/Format/BreakableToken.cpp =================================================================== --- lib/Format/BreakableToken.cpp +++ lib/Format/BreakableToken.cpp @@ -99,7 +99,7 @@ // In JavaScript, some @tags can be followed by {, and machinery that parses // these comments will fail to understand the comment if followed by a line // break. So avoid ever breaking before a {. - if (Style.Language == FormatStyle::LK_JavaScript && + while (Style.Language == FormatStyle::LK_JavaScript && SpaceOffset != StringRef::npos && SpaceOffset + 1 < Text.size() && Text[SpaceOffset + 1] == '{') SpaceOffset = Text.find_last_of(Blanks, SpaceOffset); Index: unittests/Format/FormatTestJS.cpp =================================================================== --- unittests/Format/FormatTestJS.cpp +++ unittests/Format/FormatTestJS.cpp @@ -2067,6 +2067,14 @@ " * @param {canWrap onSpace}\n" " */", getGoogleJSStyleWithColumns(20)); + // make sure clang-format doesn't break before *any* '{' + verifyFormat("/**\n" + " * @lala {lala {lalala\n" + " */\n", + "/**\n" + " * @lala {lala {lalala\n" + " */\n", + getGoogleJSStyleWithColumns(20)); verifyFormat("/**\n" " * @see http://very/very/long/url/is/long\n" " */",