From 0cae0151017cf2e4d1bd8546b3e501a2a6f2ae94 Mon Sep 17 00:00:00 2001 From: cyberslack_lee Date: Mon, 14 Aug 2023 17:42:17 +0800 Subject: [PATCH] [clang-tidy] No.52 enable bugprone-argument-comment (#56217) --- .clang-tidy | 2 +- paddle/fluid/framework/executor_cache.cc | 4 ++-- .../framework/new_executor/interpreter/stream_analyzer.cc | 4 ++-- paddle/fluid/framework/parallel_executor.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 38957a23d1d..4f548de850c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,6 +1,6 @@ --- Checks: ' --bugprone-argument-comment, +bugprone-argument-comment, -bugprone-assert-side-effect, -bugprone-bad-signal-to-kill-thread, -bugprone-bool-pointer-implicit-conversion, diff --git a/paddle/fluid/framework/executor_cache.cc b/paddle/fluid/framework/executor_cache.cc index 67646dec6db..eaa4c3ec0e5 100644 --- a/paddle/fluid/framework/executor_cache.cc +++ b/paddle/fluid/framework/executor_cache.cc @@ -266,7 +266,7 @@ CacheInfo GetExecutorInfoFromCache(const ProgramDesc &program_desc, auto &cached_value = cached_exe_info.GetMutable(program_id, is_grad); cached_value.executor_ = pe_and_graph.first; cached_value.graph_ = pe_and_graph.second; - return std::make_pair(pe_and_graph.first, /*is_new_created=*/true); + return std::make_pair(pe_and_graph.first, true); } else { VLOG(1) << "get exe_info from cache by: " << program_id << " is_grad: " << is_grad; @@ -280,7 +280,7 @@ CacheInfo GetExecutorInfoFromCache(const ProgramDesc &program_desc, // need to recreate tmp variables in new scope parallel_executor->PrepareVariables(scope); - return std::make_pair(parallel_executor, /*is_new_created=*/false); + return std::make_pair(parallel_executor, false); } } diff --git a/paddle/fluid/framework/new_executor/interpreter/stream_analyzer.cc b/paddle/fluid/framework/new_executor/interpreter/stream_analyzer.cc index 1ee621624db..3fc9dde3630 100644 --- a/paddle/fluid/framework/new_executor/interpreter/stream_analyzer.cc +++ b/paddle/fluid/framework/new_executor/interpreter/stream_analyzer.cc @@ -58,8 +58,8 @@ void StreamAnalyzer::ConstructEvents(std::vector* instructions) { std::vector>> run_type_info( instr_num, std::vector>( - /*number_of_run_type = */ 2)); // instr_id -> run_type -> - // next_instr_id + /*number_of_run_type = */ 2)); // NOLINT + // instr_id -> run_type -> next_instr_id AnalyseAllRunType( cross_step_merged_instructions_ptr, downstream_map, &run_type_info); diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 8477ee362e3..24832d20609 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -754,7 +754,7 @@ ParallelExecutor::ParallelExecutor(const platform::Place &place, /*device_count=*/1, *graph); - CreateLocalScopes(scope, /*local_scope=*/{scope}, /*create_new=*/false); + CreateLocalScopes(scope, /*local_scopes=*/{scope}, /*create_new=*/false); // Apply BuildStrategy to compile graph. std::vector graphs = {graph}; -- GitLab