From 0267aa7a2e60f9f96bdbc152643a056956e11ee2 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Mon, 15 Sep 2025 18:17:15 +0200 Subject: [PATCH] Handle case in which -extra-args has more than one extra arg. --- tool/run_O2CodeChecker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tool/run_O2CodeChecker.py b/tool/run_O2CodeChecker.py index 97c50a2..8952871 100755 --- a/tool/run_O2CodeChecker.py +++ b/tool/run_O2CodeChecker.py @@ -77,8 +77,8 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, warningsAsErrors, tmpdir, start.append('-warnings-as-errors=' + warningsAsErrors) if config: start.append('-config=' + config) - if extra_args is not None: - start.append(extra_args) + for extra in extra_args: + start.append(extra) if tmpdir is not None: start.append('-export-fixes') # Get a temporary file. We immediately close the handle so clang-tidy can @@ -152,6 +152,8 @@ def main(): args = parser.parse_args() db_path = 'compile_commands.json' + if args.extra_args: + args.extra_args = args.extra_args.split(" ") if args.build_path is not None: build_path = args.build_path