[clang-tidy] Extend InheritParentConfig to CommandLineConfig
authorNathan James <n.james93@hotmail.co.uk>
Fri, 19 Jun 2020 11:02:08 +0000 (12:02 +0100)
committerNathan James <n.james93@hotmail.co.uk>
Fri, 19 Jun 2020 11:02:19 +0000 (12:02 +0100)
commit4836188ad9b3334b0c1e055d45ccaa54ed797e4b
tree1dec540a39b3dfe3641effeeea43ac61d85ec75d
parent63a3c5925dc97160283d97cab1859315c45c114c
[clang-tidy] Extend InheritParentConfig to CommandLineConfig

Extend the `InheritParentConfig` support introduced in D75184 for the command line option `--config`.
The current behaviour of `--config` is to when set, disable looking for `.clang-tidy` configuration files.
This new behaviour lets you set `InheritParentConfig` to true in the command line to then look for `.clang-tidy` configuration files to be merged with what's been specified on the command line.

Reviewed By: DmitryPolukhin

Differential Revision: https://reviews.llvm.org/D81949
clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
clang-tools-extra/clang-tidy/ClangTidyOptions.h
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
clang-tools-extra/test/clang-tidy/infrastructure/config-files.cpp