clang-tidy: Add driver mode argument
clang-tidy
does not infer driver mode if it is not provided with a JSON compilation database. This is exactly the way cmake
launches it. Hence clang-tidy
will only use the default driver mode. This PR tries to infer driver mode from compiler identity.
- If compiler is
MSVC
driver mode is set tocl
. - Otherwise it is set to
gcc
org++
depending on the language.
Edited by Brad King