aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/ClangTidyModule.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-01-13 10:50:51 +0000
committerAlexander Kornienko <alexfh@google.com>2014-01-13 10:50:51 +0000
commit072bce7f6ce1196355a3f906bfea8465f4fd876d (patch)
tree822d2229f8bb6c4703e7b7ce647e8daa8660b0e4 /clang-tidy/ClangTidyModule.cpp
parenta3c89b5b565bbfc1fcd69347879f4dadf36733f9 (diff)
Add the check name to the clang-tidy diagnostic output.
Summary: Pass check names all the way from ClangTidyModule through ClangTidyCheck and ClangTidyContext to ClangTidyError, and output it in handleErrors. This allows to find mis-behaving check and disable it easily. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2534 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@199094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/ClangTidyModule.cpp')
-rw-r--r--clang-tidy/ClangTidyModule.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang-tidy/ClangTidyModule.cpp b/clang-tidy/ClangTidyModule.cpp
index dc3a11d0..87ab2be3 100644
--- a/clang-tidy/ClangTidyModule.cpp
+++ b/clang-tidy/ClangTidyModule.cpp
@@ -32,8 +32,11 @@ void ClangTidyCheckFactories::createChecks(
ChecksFilter &Filter, SmallVectorImpl<ClangTidyCheck *> &Checks) {
for (FactoryMap::iterator I = Factories.begin(), E = Factories.end(); I != E;
++I) {
- if (Filter.IsCheckEnabled(I->first))
- Checks.push_back(I->second->createCheck());
+ if (Filter.IsCheckEnabled(I->first)) {
+ ClangTidyCheck *Check = I->second->createCheck();
+ Check->setName(I->first);
+ Checks.push_back(Check);
+ }
}
}