Skip to content

Commit 0f50c77

Browse files
committed
Handle case in which -extra-args has more than one extra arg.
1 parent 5ddf284 commit 0f50c77

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tool/run_O2CodeChecker.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, warningsAsErrors, tmpdir,
7777
start.append('-warnings-as-errors=' + warningsAsErrors)
7878
if config:
7979
start.append('-config=' + config)
80-
if extra_args is not None:
81-
start.append(extra_args)
80+
for extra in extra_args:
81+
start.append(extra)
8282
if tmpdir is not None:
8383
start.append('-export-fixes')
8484
# Get a temporary file. We immediately close the handle so clang-tidy can
@@ -152,6 +152,8 @@ def main():
152152
args = parser.parse_args()
153153

154154
db_path = 'compile_commands.json'
155+
if args.extra_args:
156+
args.extra_args = args.extra_args.split(" ")
155157

156158
if args.build_path is not None:
157159
build_path = args.build_path

0 commit comments

Comments
 (0)