Fix new occurrences of new clang-tidy warnings

This commit is contained in:
Robert Schulze 2022-05-16 10:13:18 +02:00
parent e3cfec5b09
commit d66dcdad79
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
4 changed files with 5 additions and 5 deletions

View File

@ -126,7 +126,7 @@ SeekableReadBufferPtr CachedReadBufferFromRemoteFS::getCacheReadBuffer(size_t of
local_read_settings.local_fs_method = LocalFSReadMethod::pread;
auto buf = createReadBufferFromFileBase(path, local_read_settings);
auto from_fd = dynamic_cast<ReadBufferFromFileDescriptor*>(buf.get());
auto * from_fd = dynamic_cast<ReadBufferFromFileDescriptor*>(buf.get());
if (from_fd && from_fd->size() == 0)
throw Exception(ErrorCodes::LOGICAL_ERROR, "Attempt to read from an empty cache file: {}", path);

View File

@ -18,7 +18,7 @@ void ConvertFunctionOrLikeData::visit(ASTFunction & function, ASTPtr &)
std::unordered_map<ASTPtr, std::shared_ptr<ASTLiteral>> identifier_to_literals;
for (auto & child : function.children)
{
if (auto expr_list_fn = child->as<ASTExpressionList>())
if (auto * expr_list_fn = child->as<ASTExpressionList>())
{
ASTs unique_elems;
for (const auto & child_expr_fn : expr_list_fn->children)
@ -41,7 +41,7 @@ void ConvertFunctionOrLikeData::visit(ASTFunction & function, ASTPtr &)
/// Second one is string literal.
auto identifier = arguments[0];
auto literal = arguments[1]->as<ASTLiteral>();
auto * literal = arguments[1]->as<ASTLiteral>();
if (!identifier || !literal || literal->value.getType() != Field::Types::String)
continue;

View File

@ -14,7 +14,7 @@ class ConvertFunctionOrLikeData
public:
using TypeToVisit = ASTFunction;
void visit(ASTFunction & function, ASTPtr & ast);
static void visit(ASTFunction & function, ASTPtr & ast);
};
using ConvertFunctionOrLikeVisitor = InDepthNodeVisitor<OneTypeMatcher<ConvertFunctionOrLikeData>, true>;

View File

@ -205,7 +205,7 @@ void AggregatingStep::transformPipeline(QueryPipelineBuilder & pipeline, const B
for (size_t set_counter = 0; set_counter < grouping_sets_size; ++set_counter)
{
auto & header = ports[set_counter]->getHeader();
const auto & header = ports[set_counter]->getHeader();
/// Here we create a DAG which fills missing keys and adds `__grouping_set` column
auto dag = std::make_shared<ActionsDAG>(header.getColumnsWithTypeAndName());