[cfe-dev] [clang-tidy] Headers taken into account

Malcolm Parsons via cfe-dev cfe-dev at lists.llvm.org
Sun Nov 6 13:27:52 PST 2016


On 6 November 2016 at 20:53, Alexander Droste via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> I'd like to know how Clang-Tidy actually determines which headers are taken
> into account. When I invoke the following command in an out-of-source build,
> 'run-clang-tidy.py -fix -checks='-*,modernize-*' -header-filter='.*' -p=.'
> with 'build/debug' being pwd, all headers contained in '../../src/**' are
> taken into account. Does Clang-Tidy look for '.h,.hxx,etc.' pairs matching a
> .cpp or does it look for all headers in folders that contain source files?

run-clang-tidy.py runs clang-tidy over all the files in a compilation database.
clang-tidy checks those files and everything they #include.

-- 
Malcolm Parsons



More information about the cfe-dev mailing list