Skip to content

clang-tidy: Fix explicit --driver-mode= argument

Brad King requested to merge brad.king/cmake:clang-tidy-driver-mode into master

Since !4208 (merged) the clang-tidy tool rejects the new option:

Unknown command line argument '--driver-mode=g++'.

This is because we are adding the flag before the main compiler command-line. Encode it with --extra-arg-before= so that clang-tidy knows it is supposed to be part of the compiler command.

Suggested-by: @de1acr0ix

Merge request reports