Expose the name of the checker producing each diagnostic message.
Summary: In clang-tidy we'd like to know the name of the checker producing each diagnostic message. PathDiagnostic has BugType and Category fields, which are both arbitrary human-readable strings, but we need to know the exact name of the checker in the form that can be used in the CheckersControlList option to enable/disable the specific checker. This patch adds the CheckName field to the CheckerBase class, and sets it in the CheckerManager::registerChecker() method, which gets them from the CheckerRegistry. Checkers that implement multiple checks have to store the names of each check in the respective registerXXXChecker method. Reviewers: jordan_rose, krememek Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2557 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201186 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- examples/analyzer-plugin/MainCallChecker.cpp 1 addition, 1 deletionexamples/analyzer-plugin/MainCallChecker.cpp
- include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h 9 additions, 2 deletionsinclude/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
- include/clang/StaticAnalyzer/Core/BugReporter/BugType.h 20 additions, 9 deletionsinclude/clang/StaticAnalyzer/Core/BugReporter/BugType.h
- include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h 4 additions, 2 deletions...de/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
- include/clang/StaticAnalyzer/Core/Checker.h 5 additions, 1 deletioninclude/clang/StaticAnalyzer/Core/Checker.h
- include/clang/StaticAnalyzer/Core/CheckerManager.h 23 additions, 0 deletionsinclude/clang/StaticAnalyzer/Core/CheckerManager.h
- lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp 2 additions, 2 deletionslib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
- lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp 3 additions, 2 deletionslib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
- lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp 1 addition, 2 deletionslib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
- lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp 14 additions, 11 deletionslib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
- lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp 1 addition, 1 deletionlib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp
- lib/StaticAnalyzer/Checkers/CStringChecker.cpp 29 additions, 17 deletionslib/StaticAnalyzer/Checkers/CStringChecker.cpp
- lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp 7 additions, 6 deletionslib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
- lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp 24 additions, 24 deletionslib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
- lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp 5 additions, 5 deletionslib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
- lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp 5 additions, 4 deletionslib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
- lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp 9 additions, 7 deletionslib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
- lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp 9 additions, 8 deletionslib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
- lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp 33 additions, 18 deletionslib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
- lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp 5 additions, 3 deletionslib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
Loading
Please register or sign in to comment