Previously, all whitespace characters would increase the starting
column, which doesn't make sense. This fixes a problem, e.g. with the
length calculation in JS template strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257267
91177308-0d34-0410-b5e6-
96231b3b80d8
FormatTok->Type = TT_ImplicitStringLiteral;
break;
}
+ if (FormatTok->Type == TT_ImplicitStringLiteral)
+ break;
}
if (FormatTok->is(TT_ImplicitStringLiteral))
"var y;");
verifyFormat("var x = `\"`; // comment with matching quote \"\n"
"var y;");
+ EXPECT_EQ("it(`'aaaaaaaaaaaaaaa `, aaaaaaaaa);",
+ format("it(`'aaaaaaaaaaaaaaa `, aaaaaaaaa) ;",
+ getGoogleJSStyleWithColumns(40)));
// Backticks in a comment - not a template string.
EXPECT_EQ("var x = 1 // `/*a`;\n"
" ;",