forked from OSchip/llvm-project
Fix regression in string literal alignment.
Now correctly indents (again): a = a + "a" "a" "a"; llvm-svn: 175630
This commit is contained in:
parent
56821acc79
commit
0c91571d33
|
@ -692,7 +692,7 @@ private:
|
|||
State.Stack.pop_back();
|
||||
}
|
||||
|
||||
if (Current.is(tok::string_literal) && State.StartOfStringLiteral == 0) {
|
||||
if (Current.is(tok::string_literal)) {
|
||||
State.StartOfStringLiteral = State.Column;
|
||||
} else if (Current.isNot(tok::comment)) {
|
||||
State.StartOfStringLiteral = 0;
|
||||
|
|
|
@ -1452,6 +1452,9 @@ TEST_F(FormatTest, AlignsStringLiterals) {
|
|||
"\"aaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa "
|
||||
"aaaaaaaaaaaaaaaaaaaaa\" "
|
||||
"\"aaaaaaaaaaaaaaaa\";"));
|
||||
verifyFormat("a = a + \"a\"\n"
|
||||
" \"a\"\n"
|
||||
" \"a\";");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, AlignsPipes) {
|
||||
|
|
Loading…
Reference in New Issue