diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-02-05 14:50:17 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-02-05 14:50:17 +0000 |
commit | b6e1fde719b3c95bb1566d390f762ec96a4a2718 (patch) | |
tree | 801405a6afdc6905ffa61ef0afc2bb9a5f659c14 /clang-tools-extra/clang-tidy | |
parent | 15774dfc21ffbc14b2e67d6ad3a1f2b1a22983e9 (diff) | |
download | bcm5719-llvm-b6e1fde719b3c95bb1566d390f762ec96a4a2718.tar.gz bcm5719-llvm-b6e1fde719b3c95bb1566d390f762ec96a4a2718.zip |
[clang-tidy] Don't ignore default set of checks when a config file is found.
Summary:
This makes clang-tidy merge the default set of checks with the one
provided in the configuration file instead of just using the checks from the
config file. This adds a way to modify the default set of checks while the
previous behavior required to always define the set of checks completely.
Reviewers: djasper
Reviewed By: djasper
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D7434
llvm-svn: 228298
Diffstat (limited to 'clang-tools-extra/clang-tidy')
-rw-r--r-- | clang-tools-extra/clang-tidy/ClangTidyOptions.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp index 997529392ff..15ca2155399 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp @@ -241,10 +241,9 @@ FileOptionsProvider::TryReadConfigFile(StringRef Directory) { continue; } - ClangTidyOptions Defaults = DefaultOptionsProvider::getOptions(Directory); - // Only use checks from the config file. - Defaults.Checks = None; - return Defaults.mergeWith(*ParsedOptions).mergeWith(OverrideOptions); + return DefaultOptionsProvider::getOptions(Directory) + .mergeWith(*ParsedOptions) + .mergeWith(OverrideOptions); } return llvm::None; } |