зеркало из https://github.com/microsoft/clang-1.git
Add back accidentally deleted line and add test for it.
Before: f("a", "b" "c"); After: f("a", "b" "c"); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181980 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
62ab010d5a
Коммит
9a2f8d07bf
|
@ -744,6 +744,7 @@ private:
|
|||
State.StartOfStringLiteral = State.Column;
|
||||
} else if (!Current.isOneOf(tok::comment, tok::identifier, tok::hash,
|
||||
tok::string_literal)) {
|
||||
State.StartOfStringLiteral = 0;
|
||||
}
|
||||
|
||||
State.Column += Current.FormatTok.TokenLength;
|
||||
|
|
|
@ -2238,6 +2238,8 @@ TEST_F(FormatTest, AlignsStringLiterals) {
|
|||
verifyFormat("a = a + \"a\"\n"
|
||||
" \"a\"\n"
|
||||
" \"a\";");
|
||||
verifyFormat("f(\"a\", \"b\"\n"
|
||||
" \"c\");");
|
||||
|
||||
verifyFormat(
|
||||
"#define LL_FORMAT \"ll\"\n"
|
||||
|
|
Загрузка…
Ссылка в новой задаче