diff --git a/src/Parsers/ASTSelectQuery.cpp b/src/Parsers/ASTSelectQuery.cpp index 3be3f6c5c9a..7537628b3a5 100644 --- a/src/Parsers/ASTSelectQuery.cpp +++ b/src/Parsers/ASTSelectQuery.cpp @@ -491,7 +491,7 @@ bool ASTSelectQuery::hasQueryParameters() const if (ast->as()) return true; - for (auto child : ast->children) + for (const auto & child : ast->children) queue.push(child); } return false; diff --git a/src/Parsers/ASTSelectWithUnionQuery.cpp b/src/Parsers/ASTSelectWithUnionQuery.cpp index c38e4e2c747..76fe9582615 100644 --- a/src/Parsers/ASTSelectWithUnionQuery.cpp +++ b/src/Parsers/ASTSelectWithUnionQuery.cpp @@ -104,7 +104,7 @@ bool ASTSelectWithUnionQuery::hasQueryParameters() const return true; } - for (auto child : current->children) + for (const auto & child : current->children) queue.push(child); } return false;