diff --git a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp index 1f0bbfa52693..4ebe1237b21c 100644 --- a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp +++ b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp @@ -334,7 +334,8 @@ match callExpr Q = parse("let someMatcher\nm parmVarDecl()"); ASSERT_TRUE(isa(Q)); - EXPECT_EQ("1:1: Invalid token found when looking for a value.", cast(Q)->ErrStr); + EXPECT_EQ("1:1: Invalid token found when looking for a value.", + cast(Q)->ErrStr); Q = parse("\nm parmVarDecl()\nlet someMatcher\nm parmVarDecl()"); @@ -342,12 +343,14 @@ match callExpr Q = parse(Q->RemainingContent); ASSERT_TRUE(isa(Q)); - EXPECT_EQ("1:1: Invalid token found when looking for a value.", cast(Q)->ErrStr); + EXPECT_EQ("1:1: Invalid token found when looking for a value.", + cast(Q)->ErrStr); Q = parse("\nlet someMatcher\n"); ASSERT_TRUE(isa(Q)); - EXPECT_EQ("1:1: Invalid token found when looking for a value.", cast(Q)->ErrStr); + EXPECT_EQ("1:1: Invalid token found when looking for a value.", + cast(Q)->ErrStr); Q = parse("\nm parmVarDecl()\nlet someMatcher\n"); @@ -355,7 +358,8 @@ match callExpr Q = parse(Q->RemainingContent); ASSERT_TRUE(isa(Q)); - EXPECT_EQ("1:1: Invalid token found when looking for a value.", cast(Q)->ErrStr); + EXPECT_EQ("1:1: Invalid token found when looking for a value.", + cast(Q)->ErrStr); Q = parse(R"matcher( @@ -368,8 +372,8 @@ m parmVarDecl( ASSERT_TRUE(isa(Q)); { - llvm::raw_null_ostream NullOutStream; - dyn_cast(Q)->run(NullOutStream, QS); + llvm::raw_null_ostream NullOutStream; + dyn_cast(Q)->run(NullOutStream, QS); } Q = parse(Q->RemainingContent); diff --git a/clang/lib/ASTMatchers/Dynamic/Parser.cpp b/clang/lib/ASTMatchers/Dynamic/Parser.cpp index 061da8b8600f..a0037549ca61 100644 --- a/clang/lib/ASTMatchers/Dynamic/Parser.cpp +++ b/clang/lib/ASTMatchers/Dynamic/Parser.cpp @@ -614,7 +614,8 @@ bool Parser::parseExpressionImpl(VariantValue *Value) { case TokenInfo::TK_Period: case TokenInfo::TK_InvalidChar: const TokenInfo Token = Tokenizer->consumeNextToken(); - Error->addError(Token.Range, Error->ET_ParserInvalidToken) << (Token.Kind == TokenInfo::TK_NewLine ? "NewLine" : Token.Text); + Error->addError(Token.Range, Error->ET_ParserInvalidToken) + << (Token.Kind == TokenInfo::TK_NewLine ? "NewLine" : Token.Text); return false; }