I am in the process of moving a project that is now compiled with gcc to clang and have a bunch of warnings that gcc did not generate ( -Winconsistent-missing-override ). clang-tidy works to fix these errors in *.cpp files, however it does not apply to hpp files because the compilation command was not found in the database (as you would expect).
I use ninja to create a project and ninja -t compdb cc cxx > .build/compile_commands.json to create a compilation database. I tried to work:
clang-tidy-3.6 -p .build/ \ $(find src/ -name *.cpp) \ $(find src/ -name *.hpp) \ --checks=misc-use-override --fix
to fix errors. He refuses to touch the header files complaining:
Skipping .../src/header/file.hpp. Compile command not found.
c ++ clang ++ llvm-clang automated-refactoring clang-tidy
nishantjr
source share