From e1f3479aaaed3fe50bd62d7e26a01f89e3c33911 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Thu, 6 Aug 2020 16:53:29 +0200 Subject: [PATCH] Improve name of add_extra_arg function --- src/argprocessing.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/argprocessing.cpp b/src/argprocessing.cpp index bd3c30b00..746ba54f9 100644 --- a/src/argprocessing.cpp +++ b/src/argprocessing.cpp @@ -202,10 +202,10 @@ process_profiling_option(Context& ctx, const std::string& arg) return true; } -// Compiler in depend mode is invoked with the original arguments. Collect extra -// arguments that should be added. +// The compiler is invoked with the original arguments in the depend mode. +// Collect extra arguments that should be added. void -add_extra_arg(Context& ctx, const std::string& arg) +add_depend_mode_extra_original_args(Context& ctx, const std::string& arg) { if (ctx.config.depend_mode()) { ctx.args_info.depend_extra_args.push_back(arg); @@ -1105,14 +1105,14 @@ process_args(Context& ctx, state.cpp_args.push_back("-fcolor-diagnostics"); } state.compiler_only_args.push_back("-fcolor-diagnostics"); - add_extra_arg(ctx, "-fcolor-diagnostics"); + add_depend_mode_extra_original_args(ctx, "-fcolor-diagnostics"); } } else if (ctx.guessed_compiler == GuessedCompiler::gcc) { if (!config.run_second_cpp()) { state.cpp_args.push_back("-fdiagnostics-color"); } state.compiler_only_args.push_back("-fdiagnostics-color"); - add_extra_arg(ctx, "-fdiagnostics-color"); + add_depend_mode_extra_original_args(ctx, "-fdiagnostics-color"); } else { // Other compilers shouldn't output color, so no need to strip it. args_info.strip_diagnostics_colors = false; -- 2.47.3