diff --git a/src/Parsers/ASTQueryWithOutput.cpp b/src/Parsers/ASTQueryWithOutput.cpp index e47f4dcf29d..c57aa759969 100644 --- a/src/Parsers/ASTQueryWithOutput.cpp +++ b/src/Parsers/ASTQueryWithOutput.cpp @@ -78,7 +78,7 @@ bool ASTQueryWithOutput::resetOutputASTIfExist(IAST & ast) { if (p) { - if (auto it = std::find(ast_with_output->children.begin(), ast_with_output->children.end(), p); + if (auto * it = std::find(ast_with_output->children.begin(), ast_with_output->children.end(), p); it != ast_with_output->children.end()) ast_with_output->children.erase(it); p.reset();