This led, e.g. to break JavaScript regex literals too early.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224419
91177308-0d34-0410-b5e6-
96231b3b80d8
Column += Style.TabWidth - Column % Style.TabWidth;
break;
case '\\':
- ++Column;
if (i + 1 == e || (FormatTok->TokenText[i + 1] != '\r' &&
FormatTok->TokenText[i + 1] != '\n'))
FormatTok->Type = TT_ImplicitStringLiteral;
verifyFormat("var regex =\n"
" /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
getGoogleJSStyleWithColumns(60));
+ verifyFormat("var regex = /\\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
+ getGoogleJSStyleWithColumns(50));
}
TEST_F(FormatTestJS, RegexLiteralExamples) {