2011-02-15 02:13:31 +08:00
//===--- Checkers.td - Static Analyzer Checkers -===-----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
include "clang/StaticAnalyzer/Checkers/CheckerBase.td"
2011-02-16 05:25:03 +08:00
//===----------------------------------------------------------------------===//
// Packages.
//===----------------------------------------------------------------------===//
2012-08-25 03:46:03 +08:00
def Alpha : Package < "alpha" > ;
2011-08-04 07:14:55 +08:00
2011-02-15 15:42:33 +08:00
def Core : Package < "core" > ;
2011-03-24 08:28:47 +08:00
def CoreBuiltin : Package < "builtin" > , InPackage < Core > ;
def CoreUninitialized : Package < "uninitialized" > , InPackage < Core > ;
2012-08-25 03:46:03 +08:00
def CoreAlpha : Package < "core" > , InPackage < Alpha > , Hidden ;
2011-03-24 08:28:47 +08:00
def Cplusplus : Package < "cplusplus" > ;
2012-08-25 03:46:03 +08:00
def CplusplusAlpha : Package < "cplusplus" > , InPackage < Alpha > , Hidden ;
2011-03-24 08:28:47 +08:00
2011-03-12 14:14:28 +08:00
def DeadCode : Package < "deadcode" > ;
2012-08-25 03:46:03 +08:00
def DeadCodeAlpha : Package < "deadcode" > , InPackage < Alpha > , Hidden ;
2011-02-15 15:42:33 +08:00
2011-03-24 08:28:47 +08:00
def Security : Package < "security" > ;
2012-01-20 09:44:29 +08:00
def InsecureAPI : Package < "insecureAPI" > , InPackage < Security > ;
2012-08-25 03:46:03 +08:00
def SecurityAlpha : Package < "security" > , InPackage < Alpha > , Hidden ;
def Taint : Package < "taint" > , InPackage < SecurityAlpha > , Hidden ;
2011-02-16 05:25:03 +08:00
2011-03-24 08:28:47 +08:00
def Unix : Package < "unix" > ;
2012-08-25 03:46:03 +08:00
def UnixAlpha : Package < "unix" > , InPackage < Alpha > , Hidden ;
2012-02-21 05:10:37 +08:00
def CString : Package < "cstring" > , InPackage < Unix > , Hidden ;
2012-08-25 03:46:03 +08:00
def CStringAlpha : Package < "cstring" > , InPackage < UnixAlpha > , Hidden ;
2011-02-18 05:39:33 +08:00
2011-03-24 08:28:47 +08:00
def OSX : Package < "osx" > ;
2012-08-25 03:46:03 +08:00
def OSXAlpha : Package < "osx" > , InPackage < Alpha > , Hidden ;
2011-03-24 08:28:47 +08:00
def Cocoa : Package < "cocoa" > , InPackage < OSX > ;
2012-08-25 03:46:03 +08:00
def CocoaAlpha : Package < "cocoa" > , InPackage < OSXAlpha > , Hidden ;
2011-03-24 08:28:47 +08:00
def CoreFoundation : Package < "coreFoundation" > , InPackage < OSX > ;
2012-02-04 10:31:57 +08:00
def Containers : Package < "containers" > , InPackage < CoreFoundation > ;
2011-02-16 05:25:03 +08:00
2011-02-18 05:39:24 +08:00
def LLVM : Package < "llvm" > ;
2011-02-18 05:39:39 +08:00
def Debug : Package < "debug" > ;
2011-02-18 05:39:24 +08:00
2011-02-16 05:25:03 +08:00
//===----------------------------------------------------------------------===//
2011-03-24 08:28:47 +08:00
// Core Checkers.
2011-02-16 05:25:03 +08:00
//===----------------------------------------------------------------------===//
2011-03-24 08:28:47 +08:00
let ParentPackage = Core in {
2011-02-15 02:13:31 +08:00
2011-03-24 08:28:47 +08:00
def DereferenceChecker : Checker < "NullDereference" > ,
HelpText < "Check for dereferences of null pointers" > ,
DescFile < "DereferenceChecker.cpp" > ;
2011-02-15 15:42:33 +08:00
2011-03-24 08:28:47 +08:00
def CallAndMessageChecker : Checker < "CallAndMessage" > ,
HelpText < "Check for logical errors for function calls and Objective-C message expressions (e.g., uninitialized arguments, null function pointers)" > ,
DescFile < "CallAndMessageChecker.cpp" > ;
2011-02-15 15:42:33 +08:00
2011-03-24 08:28:47 +08:00
def AttrNonNullChecker : Checker < "AttributeNonNull" > ,
HelpText < "Check for null pointers passed as arguments to a function whose arguments are marked with the 'nonnull' attribute" > ,
DescFile < "AttrNonNullChecker.cpp" > ;
2011-02-16 09:40:52 +08:00
2011-03-24 08:28:47 +08:00
def VLASizeChecker : Checker < "VLASize" > ,
HelpText < "Check for declarations of VLA of undefined or zero size" > ,
DescFile < "VLASizeChecker.cpp" > ;
2011-03-14 04:35:21 +08:00
2011-03-24 08:28:47 +08:00
def DivZeroChecker : Checker < "DivideZero" > ,
HelpText < "Check for division by zero" > ,
DescFile < "DivZeroChecker.cpp" > ;
2011-02-16 09:40:52 +08:00
2011-03-24 08:28:47 +08:00
def UndefResultChecker : Checker < "UndefinedBinaryOperatorResult" > ,
HelpText < "Check for undefined results of binary operators" > ,
DescFile < "UndefResultChecker.cpp" > ;
2011-02-18 05:39:33 +08:00
2011-03-24 08:28:47 +08:00
def StackAddrEscapeChecker : Checker < "StackAddressEscape" > ,
HelpText < "Check that addresses to stack memory do not escape the function" > ,
DescFile < "StackAddrEscapeChecker.cpp" > ;
2011-02-18 05:39:33 +08:00
2012-08-07 07:25:39 +08:00
def DynamicTypePropagation : Checker < "DynamicTypePropagation" > ,
HelpText < "Generate dynamic type information" > ,
DescFile < "DynamicTypePropagation.cpp" > ;
2011-03-24 08:28:47 +08:00
} // end "core"
2011-02-15 15:42:33 +08:00
2012-08-25 03:46:03 +08:00
let ParentPackage = CoreAlpha in {
2011-02-28 09:27:07 +08:00
2012-02-12 00:32:09 +08:00
def BoolAssignmentChecker : Checker < "BoolAssignment" > ,
HelpText < "Warn about assigning non-{0,1} values to Boolean variables" > ,
DescFile < "BoolAssignmentChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
def CastSizeChecker : Checker < "CastSize" > ,
HelpText < "Check when casting a malloc'ed type T, whether the size is a multiple of the size of T" > ,
DescFile < "CastSizeChecker.cpp" > ;
2011-03-01 01:36:18 +08:00
2011-03-24 08:28:47 +08:00
def CastToStructChecker : Checker < "CastToStruct" > ,
HelpText < "Check for cast from non-struct pointer to struct pointer" > ,
DescFile < "CastToStructChecker.cpp" > ;
2011-02-28 09:28:13 +08:00
2011-03-24 08:28:47 +08:00
def FixedAddressChecker : Checker < "FixedAddr" > ,
HelpText < "Check for assignment of a fixed address to a pointer" > ,
DescFile < "FixedAddressChecker.cpp" > ;
2011-02-28 09:28:05 +08:00
2011-03-24 08:28:47 +08:00
def PointerArithChecker : Checker < "PointerArithm" > ,
HelpText < "Check for pointer arithmetic on locations other than array elements" > ,
DescFile < "PointerArithChecker" > ;
2011-02-28 09:28:01 +08:00
2011-03-24 08:28:47 +08:00
def PointerSubChecker : Checker < "PointerSub" > ,
HelpText < "Check for pointer subtractions on two pointers pointing to different memory chunks" > ,
DescFile < "PointerSubChecker" > ;
2011-02-28 09:27:54 +08:00
2011-03-24 08:28:47 +08:00
def SizeofPointerChecker : Checker < "SizeofPtr" > ,
HelpText < "Warn about unintended use of sizeof() on pointer expressions" > ,
DescFile < "CheckSizeofPointer.cpp" > ;
2011-02-28 09:27:50 +08:00
2011-03-24 08:28:47 +08:00
} // end "core.experimental"
//===----------------------------------------------------------------------===//
// Evaluate "builtin" functions.
//===----------------------------------------------------------------------===//
let ParentPackage = CoreBuiltin in {
def NoReturnFunctionChecker : Checker < "NoReturnFunctions" > ,
HelpText < "Evaluate \" panic \ " functions that are known to not return to the caller" > ,
DescFile < "NoReturnFunctionChecker.cpp" > ;
def BuiltinFunctionChecker : Checker < "BuiltinFunctions" > ,
HelpText < "Evaluate compiler builtin functions (e.g., alloca())" > ,
DescFile < "BuiltinFunctionChecker.cpp" > ;
2011-02-28 09:27:46 +08:00
2011-03-24 08:28:47 +08:00
} // end "core.builtin"
//===----------------------------------------------------------------------===//
// Uninitialized values checkers.
//===----------------------------------------------------------------------===//
let ParentPackage = CoreUninitialized in {
def UndefinedArraySubscriptChecker : Checker < "ArraySubscript" > ,
HelpText < "Check for uninitialized values used as array subscripts" > ,
2011-02-28 09:27:41 +08:00
DescFile < "UndefinedArraySubscriptChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
def UndefinedAssignmentChecker : Checker < "Assign" > ,
HelpText < "Check for assigning uninitialized values" > ,
2011-02-28 09:27:37 +08:00
DescFile < "UndefinedAssignmentChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
def UndefBranchChecker : Checker < "Branch" > ,
HelpText < "Check for uninitialized values used as branch conditions" > ,
2011-02-28 09:27:33 +08:00
DescFile < "UndefBranchChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
def UndefCapturedBlockVarChecker : Checker < "CapturedBlockVariable" > ,
2011-02-28 09:27:26 +08:00
HelpText < "Check for blocks that capture uninitialized values" > ,
DescFile < "UndefCapturedBlockVarChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
def ReturnUndefChecker : Checker < "UndefReturn" > ,
HelpText < "Check for uninitialized values being returned to the caller" > ,
DescFile < "ReturnUndefChecker.cpp" > ;
2011-02-28 09:27:26 +08:00
2011-03-24 08:28:47 +08:00
} // end "core.uninitialized"
2011-02-28 09:27:22 +08:00
2011-03-24 08:28:47 +08:00
//===----------------------------------------------------------------------===//
// C++ checkers.
//===----------------------------------------------------------------------===//
2011-02-28 09:27:17 +08:00
2012-08-25 03:46:03 +08:00
let ParentPackage = CplusplusAlpha in {
2011-02-28 09:27:07 +08:00
2012-01-04 07:18:57 +08:00
def VirtualCallChecker : Checker < "VirtualCall" > ,
HelpText < "Check virtual function calls during construction or destruction" > ,
DescFile < "VirtualCallChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
} // end: "cplusplus.experimental"
//===----------------------------------------------------------------------===//
// Deadcode checkers.
//===----------------------------------------------------------------------===//
2011-02-28 09:27:12 +08:00
2011-03-12 14:14:28 +08:00
let ParentPackage = DeadCode in {
2011-02-18 05:39:33 +08:00
def DeadStoresChecker : Checker < "DeadStores" > ,
2011-03-26 08:25:42 +08:00
HelpText < "Check for values stored to variables that are never read afterwards" > ,
2011-02-18 05:39:33 +08:00
DescFile < "DeadStoresChecker.cpp" > ;
2012-01-20 14:00:17 +08:00
} // end DeadCode
2012-08-25 03:46:03 +08:00
let ParentPackage = DeadCodeAlpha in {
2011-02-18 05:39:33 +08:00
2011-03-12 14:14:28 +08:00
def IdempotentOperationChecker : Checker < "IdempotentOperations" > ,
HelpText < "Warn about idempotent operations" > ,
DescFile < "IdempotentOperationChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
def UnreachableCodeChecker : Checker < "UnreachableCode" > ,
HelpText < "Check unreachable code" > ,
DescFile < "UnreachableCodeChecker.cpp" > ;
} // end "deadcode.experimental"
//===----------------------------------------------------------------------===//
// Security checkers.
//===----------------------------------------------------------------------===//
2012-01-20 09:44:29 +08:00
let ParentPackage = InsecureAPI in {
def gets : Checker < "gets" > ,
HelpText < "Warn on uses of the 'gets' function" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
def getpw : Checker < "getpw" > ,
HelpText < "Warn on uses of the 'getpw' function" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
def mktemp : Checker < "mktemp" > ,
HelpText < "Warn on uses of the 'mktemp' function" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
2012-01-20 13:35:06 +08:00
def mkstemp : Checker < "mkstemp" > ,
HelpText < "Warn when 'mkstemp' is passed fewer than 6 X's in the format string" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
2012-01-20 09:44:29 +08:00
def rand : Checker < "rand" > ,
HelpText < "Warn on uses of the 'rand', 'random', and related functions" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
def strcpy : Checker < "strcpy" > ,
HelpText < "Warn on uses of the 'strcpy' and 'strcat' functions" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
def vfork : Checker < "vfork" > ,
HelpText < "Warn on uses of the 'vfork' function" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
2012-01-20 13:35:06 +08:00
def UncheckedReturn : Checker < "UncheckedReturn" > ,
HelpText < "Warn on uses of functions whose return values must be always checked" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
2012-01-20 09:44:29 +08:00
}
let ParentPackage = Security in {
def FloatLoopCounter : Checker < "FloatLoopCounter" > ,
HelpText < "Warn on using a floating point value as a loop counter (CERT: FLP30-C, FLP30-CPP)" > ,
DescFile < "CheckSecuritySyntaxOnly.cpp" > ;
}
2011-03-24 08:28:47 +08:00
2012-08-25 03:46:03 +08:00
let ParentPackage = SecurityAlpha in {
2011-03-24 08:28:47 +08:00
def ArrayBoundChecker : Checker < "ArrayBound" > ,
HelpText < "Warn about buffer overflows (older checker)" > ,
DescFile < "ArrayBoundChecker.cpp" > ;
def ArrayBoundCheckerV2 : Checker < "ArrayBoundV2" > ,
HelpText < "Warn about buffer overflows (newer checker)" > ,
DescFile < "ArrayBoundCheckerV2.cpp" > ;
def ReturnPointerRangeChecker : Checker < "ReturnPtrRange" > ,
HelpText < "Check for an out-of-bound pointer being returned to callers" > ,
DescFile < "ReturnPointerRangeChecker.cpp" > ;
2011-08-04 04:17:43 +08:00
def MallocOverflowSecurityChecker : Checker < "MallocOverflow" > ,
HelpText < "Check for overflows in the arguments to malloc()" > ,
DescFile < "MallocOverflowSecurityChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
} // end "security.experimental"
2011-11-17 03:58:13 +08:00
//===----------------------------------------------------------------------===//
// Taint checkers.
//===----------------------------------------------------------------------===//
let ParentPackage = Taint in {
def GenericTaintChecker : Checker < "TaintPropagation" > ,
HelpText < "Generate taint information used by other checkers" > ,
DescFile < "GenericTaintChecker.cpp" > ;
} // end "experimental.security.taint"
2011-03-24 08:28:47 +08:00
//===----------------------------------------------------------------------===//
// Unix API checkers.
//===----------------------------------------------------------------------===//
let ParentPackage = Unix in {
2011-02-15 15:42:38 +08:00
def UnixAPIChecker : Checker < "API" > ,
2011-02-15 15:42:33 +08:00
HelpText < "Check calls to various UNIX/Posix functions" > ,
DescFile < "UnixAPIChecker.cpp" > ;
2012-02-21 05:10:37 +08:00
def MallocPessimistic : Checker < "Malloc" > ,
HelpText < "Check for memory leaks, double free, and use-after-free problems." > ,
DescFile < "MallocChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
2012-05-08 07:30:29 +08:00
def MallocSizeofChecker : Checker < "MallocSizeof" > ,
HelpText < "Check for dubious malloc arguments involving sizeof" > ,
DescFile < "MallocSizeofChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
} // end "unix"
2012-08-25 03:46:03 +08:00
let ParentPackage = UnixAlpha in {
2011-03-24 08:28:47 +08:00
def ChrootChecker : Checker < "Chroot" > ,
HelpText < "Check improper use of chroot" > ,
DescFile < "ChrootChecker.cpp" > ;
2012-02-09 07:16:52 +08:00
def MallocOptimistic : Checker < "MallocWithAnnotations" > ,
HelpText < "Check for memory leaks, double free, and use-after-free problems. Assumes that all user-defined functions which might free a pointer are annotated." > ,
DescFile < "MallocChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
def PthreadLockChecker : Checker < "PthreadLock" > ,
HelpText < "Simple lock -> unlock checker" > ,
DescFile < "PthreadLockChecker.cpp" > ;
def StreamChecker : Checker < "Stream" > ,
HelpText < "Check stream handling functions" > ,
DescFile < "StreamChecker.cpp" > ;
} // end "unix.experimental"
2012-02-01 03:33:39 +08:00
let ParentPackage = CString in {
2012-02-07 08:56:14 +08:00
def CStringNullArg : Checker < "NullArg" > ,
HelpText < "Check for null pointers being passed as arguments to C string functions" > ,
DescFile < "CStringChecker.cpp" > ;
2012-02-21 05:10:37 +08:00
def CStringSyntaxChecker : Checker < "BadSizeArg" > ,
HelpText < "Check the size argument passed into C string functions for common erroneous patterns" > ,
DescFile < "CStringSyntaxChecker.cpp" > ;
}
2012-08-25 03:46:03 +08:00
let ParentPackage = CStringAlpha in {
2012-02-21 05:10:37 +08:00
2012-02-07 08:56:14 +08:00
def CStringOutOfBounds : Checker < "OutOfBounds" > ,
HelpText < "Check for out-of-bounds access in string functions" > ,
DescFile < "CStringChecker.cpp" > ;
def CStringBufferOverlap : Checker < "BufferOverlap" > ,
HelpText < "Checks for overlap in two buffer arguments" > ,
DescFile < "CStringChecker.cpp" > ;
def CStringNotNullTerm : Checker < "NotNullTerminated" > ,
HelpText < "Check for arguments which are not null-terminating strings" > ,
2012-02-01 03:33:39 +08:00
DescFile < "CStringChecker.cpp" > ;
}
2011-03-24 08:28:47 +08:00
//===----------------------------------------------------------------------===//
// Mac OS X, Cocoa, and Core Foundation checkers.
//===----------------------------------------------------------------------===//
let ParentPackage = OSX in {
2011-02-15 15:42:33 +08:00
2011-02-15 15:42:38 +08:00
def MacOSXAPIChecker : Checker < "API" > ,
2011-03-24 08:28:47 +08:00
InPackage < OSX > ,
2011-02-26 06:00:43 +08:00
HelpText < "Check for proper uses of various Mac OS X APIs" > ,
2011-02-15 15:42:33 +08:00
DescFile < "MacOSXAPIChecker.cpp" > ;
2011-02-16 05:25:03 +08:00
2011-02-28 09:27:02 +08:00
def OSAtomicChecker : Checker < "AtomicCAS" > ,
2011-03-24 08:28:47 +08:00
InPackage < OSX > ,
2011-02-28 09:27:02 +08:00
HelpText < "Evaluate calls to OSAtomic functions" > ,
DescFile < "OSAtomicChecker.cpp" > ;
2011-08-17 04:02:05 +08:00
def MacOSKeychainAPIChecker : Checker < "SecKeychainAPI" > ,
InPackage < OSX > ,
2011-08-02 06:40:01 +08:00
HelpText < "Check for proper uses of Secure Keychain APIs" > ,
DescFile < "MacOSKeychainAPIChecker.cpp" > ;
2011-08-17 04:02:05 +08:00
} // end "macosx"
2011-08-02 06:40:01 +08:00
2011-03-24 08:28:47 +08:00
let ParentPackage = Cocoa in {
def ObjCAtSyncChecker : Checker < "AtSync" > ,
2012-05-25 01:31:59 +08:00
HelpText < "Check for nil pointers used as mutexes for @synchronized" > ,
2011-03-24 08:28:47 +08:00
DescFile < "ObjCAtSyncChecker.cpp" > ;
def NilArgChecker : Checker < "NilArg" > ,
HelpText < "Check for prohibited nil arguments to ObjC method calls" > ,
DescFile < "BasicObjCFoundationChecks.cpp" > ;
def ClassReleaseChecker : Checker < "ClassRelease" > ,
HelpText < "Check for sending 'retain', 'release', or 'autorelease' directly to a Class" > ,
DescFile < "BasicObjCFoundationChecks.cpp" > ;
def VariadicMethodTypeChecker : Checker < "VariadicMethodTypes" > ,
2012-05-25 01:31:59 +08:00
HelpText < "Check for passing non-Objective-C types to variadic collection "
"initialization methods that expect only Objective-C types" > ,
2011-03-24 08:28:47 +08:00
DescFile < "BasicObjCFoundationChecks.cpp" > ;
def NSAutoreleasePoolChecker : Checker < "NSAutoreleasePool" > ,
HelpText < "Warn for suboptimal uses of NSAutoreleasePool in Objective-C GC mode" > ,
DescFile < "NSAutoreleasePoolChecker.cpp" > ;
def ObjCMethSigsChecker : Checker < "IncompatibleMethodTypes" > ,
HelpText < "Warn about Objective-C method signatures with type incompatibilities" > ,
DescFile < "CheckObjCInstMethSignature.cpp" > ;
def ObjCUnusedIvarsChecker : Checker < "UnusedIvars" > ,
HelpText < "Warn about private ivars that are never used" > ,
DescFile < "ObjCUnusedIVarsChecker.cpp" > ;
2012-02-04 10:31:57 +08:00
def ObjCSelfInitChecker : Checker < "SelfInit" > ,
HelpText < "Check that 'self' is properly initialized inside an initializer method" > ,
DescFile < "ObjCSelfInitChecker.cpp" > ;
2012-06-12 00:40:41 +08:00
def ObjCLoopChecker : Checker < "Loops" > ,
HelpText < "Improved modeling of loops using Cocoa collection types" > ,
DescFile < "BasicObjCFoundationChecks.cpp" > ;
2012-08-23 05:19:56 +08:00
def ObjCNonNilReturnValueChecker : Checker < "NonNilReturnValue" > ,
HelpText < "Model the APIs that are guaranteed to return a non-nil value" > ,
DescFile < "BasicObjCFoundationChecks.cpp" > ;
2011-03-24 08:28:47 +08:00
def NSErrorChecker : Checker < "NSError" > ,
HelpText < "Check usage of NSError** parameters" > ,
DescFile < "NSErrorChecker.cpp" > ;
2011-09-02 13:55:19 +08:00
def RetainCountChecker : Checker < "RetainCount" > ,
HelpText < "Check for leaks and improper reference count management" > ,
DescFile < "RetainCountChecker.cpp" > ;
2012-05-25 01:31:59 +08:00
} // end "osx.cocoa"
2011-03-24 08:28:47 +08:00
2012-08-25 03:46:03 +08:00
let ParentPackage = CocoaAlpha in {
2011-03-24 08:28:47 +08:00
def ObjCDeallocChecker : Checker < "Dealloc" > ,
HelpText < "Warn about Objective-C classes that lack a correct implementation of -dealloc" > ,
DescFile < "CheckObjCDealloc.cpp" > ;
2012-08-25 03:46:03 +08:00
} // end "cocoa.alpha"
2011-03-24 08:28:47 +08:00
let ParentPackage = CoreFoundation in {
2011-02-16 09:40:52 +08:00
def CFNumberCreateChecker : Checker < "CFNumber" > ,
2011-02-26 06:00:43 +08:00
HelpText < "Check for proper uses of CFNumberCreate" > ,
2011-02-16 09:40:52 +08:00
DescFile < "BasicObjCFoundationChecks.cpp" > ;
def CFRetainReleaseChecker : Checker < "CFRetainRelease" > ,
HelpText < "Check for null arguments to CFRetain/CFRelease" > ,
DescFile < "BasicObjCFoundationChecks.cpp" > ;
2011-03-01 01:36:18 +08:00
def CFErrorChecker : Checker < "CFError" > ,
HelpText < "Check usage of CFErrorRef* parameters" > ,
DescFile < "NSErrorChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
}
2012-01-31 05:14:16 +08:00
let ParentPackage = Containers in {
def ObjCContainersASTChecker : Checker < "PointerSizedValues" > ,
HelpText < "Warns if 'CFArray', 'CFDictionary', 'CFSet' are created with non-pointer-size values" > ,
2012-02-04 10:31:57 +08:00
DescFile < "ObjCContainersASTChecker.cpp" > ;
def ObjCContainersChecker : Checker < "OutOfBounds" > ,
2012-02-07 08:56:14 +08:00
HelpText < "Checks for index out-of-bounds when using 'CFArray' API" > ,
2012-02-04 10:31:57 +08:00
DescFile < "ObjCContainersChecker.cpp" > ;
2012-01-31 05:14:16 +08:00
}
2011-03-24 08:28:47 +08:00
//===----------------------------------------------------------------------===//
// Checkers for LLVM development.
//===----------------------------------------------------------------------===//
2011-03-01 01:36:18 +08:00
2011-02-18 05:39:24 +08:00
def LLVMConventionsChecker : Checker < "Conventions" > ,
InPackage < LLVM > ,
HelpText < "Check code for LLVM codebase conventions" > ,
DescFile < "LLVMConventionsChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
//===----------------------------------------------------------------------===//
// Debugging checkers (for analyzer development).
//===----------------------------------------------------------------------===//
let ParentPackage = Debug in {
2011-10-25 08:25:24 +08:00
def DominatorsTreeDumper : Checker < "DumpDominators" > ,
HelpText < "Print the dominance tree for a given CFG" > ,
DescFile < "DebugCheckers.cpp" > ;
2011-02-18 05:39:39 +08:00
def LiveVariablesDumper : Checker < "DumpLiveVars" > ,
HelpText < "Print results of live variable analysis" > ,
DescFile < "DebugCheckers.cpp" > ;
def CFGViewer : Checker < "ViewCFG" > ,
HelpText < "View Control-Flow Graphs using GraphViz" > ,
DescFile < "DebugCheckers.cpp" > ;
def CFGDumper : Checker < "DumpCFG" > ,
HelpText < "Display Control-Flow Graphs" > ,
DescFile < "DebugCheckers.cpp" > ;
2012-03-08 08:42:23 +08:00
def CallGraphViewer : Checker < "ViewCallGraph" > ,
HelpText < "View Call Graph using GraphViz" > ,
DescFile < "DebugCheckers.cpp" > ;
def CallGraphDumper : Checker < "DumpCallGraph" > ,
HelpText < "Display Call Graph" > ,
DescFile < "DebugCheckers.cpp" > ;
2012-06-29 08:33:10 +08:00
def TraversalDumper : Checker < "DumpTraversal" > ,
HelpText < "Print branch conditions as they are traversed by the engine" > ,
DescFile < "TraversalChecker.cpp" > ;
2012-07-11 07:56:23 +08:00
def CallDumper : Checker < "DumpCalls" > ,
HelpText < "Print calls as they are traversed by the engine" > ,
DescFile < "TraversalChecker.cpp" > ;
2011-02-28 09:26:50 +08:00
def AnalyzerStatsChecker : Checker < "Stats" > ,
HelpText < "Emit warnings with analyzer statistics" > ,
DescFile < "AnalyzerStatsChecker.cpp" > ;
2011-12-06 02:58:01 +08:00
def TaintTesterChecker : Checker < "TaintTest" > ,
HelpText < "Mark tainted symbols as such." > ,
DescFile < "TaintTesterChecker.cpp" > ;
2012-05-17 00:01:07 +08:00
def ExprInspectionChecker : Checker < "ExprInspection" > ,
HelpText < "Check the analyzer's understanding of expressions" > ,
DescFile < "ExprInspectionChecker.cpp" > ;
2011-03-24 08:28:47 +08:00
} // end "debug"
2011-02-16 06:55:20 +08:00