Home

Expose the name of the checker producing each diagnostic message.

Press ? to show keyboard shortcuts.
Committed
alexfhFeb 11 2014, 1:49 PM
Reviewer
jordan_rose
Differential Revision
D2557: Expose the name of the checker producing each diagnostic message.
Parents
rL201185: DebugInfo: Remove dependence on file numbering in the line table.
Branches
Unknown
Tags
Unknown
Subscribers
None
Projects
None
Description

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

Changes (69)

HistoryBrowseChangePath
HistoryBrowseModifiedcfe/trunk/examples/analyzer-plugin/MainCallChecker.cpp
HistoryBrowseModifiedcfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
HistoryBrowseModifiedcfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
HistoryBrowseModifiedcfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
HistoryBrowseModifiedcfe/trunk/include/clang/StaticAnalyzer/Core/Checker.h
HistoryBrowseModifiedcfe/trunk/include/clang/StaticAnalyzer/Core/CheckerManager.h
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Core/Checker.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp
HistoryBrowseModifiedcfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp

rL201186

cfe/trunk/examples/analyzer-plugin/MainCallChecker.cpp

Loading...

cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h

Loading...

cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h

Loading...

cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h

Loading...

cfe/trunk/include/clang/StaticAnalyzer/Core/Checker.h

Loading...

cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerManager.h

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Core/Checker.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp

Loading...

cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp

Loading...

Add Comment