summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-10-28 22:16:13 +0000
committerAlexander Kornienko <alexfh@google.com>2014-10-28 22:16:13 +0000
commit37f7abe4244c2c532b5e9545bcae93847e36264c (patch)
tree50431998ca032c2e6a9f7121062dcc4298952423 /clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
parent349847d02a00017225b34b35eeb9dceb730d08b8 (diff)
downloadbcm5719-llvm-37f7abe4244c2c532b5e9545bcae93847e36264c.tar.gz
bcm5719-llvm-37f7abe4244c2c532b5e9545bcae93847e36264c.zip
[clang-tidy] Added -system-headers option.
Added -system-headers option to allow display of warnings from system headers. This is needed for testing libcxx, for example. llvm-svn: 220826
Diffstat (limited to 'clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index 38c99ef1488..06e0e3f3903 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -367,7 +367,8 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location) {
}
const SourceManager &Sources = Diags->getSourceManager();
- if (Sources.isInSystemHeader(Location))
+ if (!*Context.getOptions().SystemHeaders &&
+ Sources.isInSystemHeader(Location))
return;
// FIXME: We start with a conservative approach here, but the actual type of
OpenPOWER on IntegriCloud