]> granicus.if.org Git - clang/commitdiff
Rework checker "packages" and groups to be more hierarchical.
authorTed Kremenek <kremenek@apple.com>
Thu, 24 Mar 2011 00:28:47 +0000 (00:28 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 24 Mar 2011 00:28:47 +0000 (00:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128187 91177308-0d34-0410-b5e6-96231b3b80d8

32 files changed:
lib/Driver/Tools.cpp
lib/StaticAnalyzer/Checkers/Checkers.td
test/Analysis/CFNumber.c
test/Analysis/CheckNSError.m
test/Analysis/MissingDealloc.m
test/Analysis/NSString.m
test/Analysis/ObjCRetSigs.m
test/Analysis/PR2978.m
test/Analysis/additive-folding.c
test/Analysis/array-struct-region.c
test/Analysis/bstring.c
test/Analysis/constant-folding.c
test/Analysis/free.c
test/Analysis/iterators.cpp
test/Analysis/malloc.c
test/Analysis/misc-ps-region-store.m
test/Analysis/misc-ps.m
test/Analysis/no-outofbounds.c
test/Analysis/out-of-bounds.c
test/Analysis/outofbound.c
test/Analysis/rdar-6541136-region.c
test/Analysis/retain-release-gc-only.m
test/Analysis/retain-release.m
test/Analysis/security-syntax-checks-no-emit.c
test/Analysis/security-syntax-checks.m
test/Analysis/self-init.m
test/Analysis/string.c
test/Analysis/undef-buffers.c
test/Analysis/unix-fns.c
test/Analysis/unreachable-code-path.c
test/Analysis/unused-ivars.m
test/Analysis/variadic-method-types.m

index 59cdfe044f0b491f1af19097271fe1faf02ff66e..beaeade836cec340a79b335e1265d2d3ebb84043 100644 (file)
@@ -1020,28 +1020,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     // Treat blocks as analysis entry points.
     CmdArgs.push_back("-analyzer-opt-analyze-nested-blocks");
 
+    CmdArgs.push_back("-analyzer-eagerly-assume");
+
     // Add default argument set.
     if (!Args.hasArg(options::OPT__analyzer_no_default_checks)) {
-      types::ID InputType = Inputs[0].getType();
-
-      // Checks to perform for all language types.
-
       CmdArgs.push_back("-analyzer-checker=core");
+      CmdArgs.push_back("-analyzer-checker=deadcode");
+      CmdArgs.push_back("-analyzer-checker=security");
+
       if (getToolChain().getTriple().getOS() != llvm::Triple::Win32)
         CmdArgs.push_back("-analyzer-checker=unix");
-      if (getToolChain().getTriple().getVendor() == llvm::Triple::Apple)
-        CmdArgs.push_back("-analyzer-checker=macosx");
 
-      CmdArgs.push_back("-analyzer-checker=deadcode.DeadStores");
-      CmdArgs.push_back("-analyzer-checker=deadcode.IdempotentOperations");
-
-      // Checks to perform for Objective-C/Objective-C++.
-      if (types::isObjC(InputType)) {
-        // Enable all checkers in 'cocoa' package.
-        CmdArgs.push_back("-analyzer-checker=cocoa");
-      }
-
-      CmdArgs.push_back("-analyzer-eagerly-assume");
+      if (getToolChain().getTriple().getVendor() == llvm::Triple::Apple)
+        CmdArgs.push_back("-analyzer-checker=osx");
     }
 
     // Set the output format. The default is plist, for (lame) historical
index c139476960c8905e4ab85aee26b54f5fb4c268c4..1e20b4d247a3661b03d54de3f3c31e2b6812d78e 100644 (file)
@@ -14,19 +14,26 @@ include "clang/StaticAnalyzer/Checkers/CheckerBase.td"
 //===----------------------------------------------------------------------===//
 
 def Core : Package<"core">;
-def Cocoa : Package<"cocoa">;
-def Unix : Package<"unix">;
-def MacOSX : Package<"macosx">;
+def CoreBuiltin : Package<"builtin">, InPackage<Core>;
+def CoreUninitialized  : Package<"uninitialized">, InPackage<Core>;
+def CoreExperimental : Package<"experimental">, InPackage<Core>, Hidden;
+
+def Cplusplus : Package<"cplusplus">;
+def CplusplusExperimental : Package<"experimental">, InPackage<Cplusplus>, Hidden;
+
 def DeadCode : Package<"deadcode">;
+def DeadCodeExperimental : Package<"experimental">, InPackage<DeadCode>, Hidden;
 
-def CoreExperimental : Package<"experimental">,
-  InPackage<Core>, Hidden;
+def Security : Package <"security">;
+def SecurityExperimental : Package<"experimental">, InPackage<Security>, Hidden;
 
-def CocoaExperimental : Package<"experimental">,
-  InPackage<Cocoa>, Hidden;
+def Unix : Package<"unix">;
+def UnixExperimental : Package<"experimental">, InPackage<Unix>, Hidden;
 
-def UnixExperimental : Package<"experimental">,
-  InPackage<Unix>, Hidden;
+def OSX : Package<"osx">;
+def Cocoa : Package<"cocoa">, InPackage<OSX>;
+def CocoaExperimental : Package<"experimental">, InPackage<Cocoa>, Hidden;
+def CoreFoundation : Package<"coreFoundation">, InPackage<OSX>;
 
 def LLVM : Package<"llvm">;
 def Debug : Package<"debug">;
@@ -39,113 +46,144 @@ def AllExperimental : CheckerGroup<"all-experimental">,
   Hidden;
 
 //===----------------------------------------------------------------------===//
-// Checkers.
+// Core Checkers.
 //===----------------------------------------------------------------------===//
 
-let ParentPackage = Cocoa in {
+let ParentPackage = Core in {
 
-def ObjCSelfInitChecker : Checker<"SelfInit">,
-  HelpText<"Check that 'self' is propely initialized inside an initializer method">,
-  DescFile<"ObjCSelfInitChecker.cpp">;
+def DereferenceChecker : Checker<"NullDereference">,
+  HelpText<"Check for dereferences of null pointers">,
+  DescFile<"DereferenceChecker.cpp">;
 
-def ObjCAtSyncChecker : Checker<"AtSync">,
-  HelpText<"Check for null pointers used as mutexes for @synchronized">,
-  DescFile<"ObjCAtSyncChecker.cpp">;
+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">;
 
-def NilArgChecker : Checker<"NilArg">,
-  HelpText<"Check for prohibited nil arguments to ObjC method calls">,
-  DescFile<"BasicObjCFoundationChecks.cpp">;
+def AdjustedReturnValueChecker : Checker<"AdjustedReturnValue">,
+  HelpText<"Check to see if the return value of a function call is different than the caller expects (e.g., from calls through function pointers)">,
+  DescFile<"AdjustedReturnValueChecker.cpp">;
 
-def ClassReleaseChecker : Checker<"ClassRelease">,
-  HelpText<"Check for sending 'retain', 'release', or 'autorelease' directly to a Class">,
-  DescFile<"BasicObjCFoundationChecks.cpp">;
+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">;
 
-def VariadicMethodTypeChecker : Checker<"VariadicMethodTypes">,
-  HelpText<"Check for passing non-Objective-C types to variadic methods that expect"
-           "only Objective-C types">,
-  DescFile<"BasicObjCFoundationChecks.cpp">;
+def VLASizeChecker : Checker<"VLASize">,
+  HelpText<"Check for declarations of VLA of undefined or zero size">,
+  DescFile<"VLASizeChecker.cpp">;
 
-def NSAutoreleasePoolChecker : Checker<"NSAutoreleasePool">,
-  HelpText<"Warn for subpar uses of NSAutoreleasePool">,
-  DescFile<"NSAutoreleasePoolChecker.cpp">;
+def DivZeroChecker : Checker<"DivideZero">,
+  HelpText<"Check for division by zero">,
+  DescFile<"DivZeroChecker.cpp">;
 
-def ObjCMethSigsChecker : Checker<"MethodSigs">,
-  HelpText<"Warn about Objective-C method signatures with type incompatibilities">,
-  DescFile<"CheckObjCInstMethSignature.cpp">;
+def UndefResultChecker : Checker<"UndefinedBinaryOperatorResult">,
+  HelpText<"Check for undefined results of binary operators">,
+  DescFile<"UndefResultChecker.cpp">;
 
-def ObjCUnusedIvarsChecker : Checker<"UnusedIvars">,
-  HelpText<"Warn about private ivars that are never used">,
-  DescFile<"ObjCUnusedIVarsChecker.cpp">;
-def NSErrorChecker : Checker<"NSError">,
-  HelpText<"Check usage of NSError** parameters">,
-  DescFile<"NSErrorChecker.cpp">;
+def StackAddrEscapeChecker : Checker<"StackAddressEscape">,
+  HelpText<"Check that addresses to stack memory do not escape the function">,
+  DescFile<"StackAddrEscapeChecker.cpp">;
 
-} // end "cocoa"
+} // end "core"
 
-let ParentPackage = Core in {
+let ParentPackage = CoreExperimental in {
 
-def DereferenceChecker : Checker<"Deref">,
-  HelpText<"Check for null pointers at loads and stores">,
-  DescFile<"DereferenceChecker.cpp">;
+def CastSizeChecker : Checker<"CastSize">,
+  InGroup<AllExperimental>,
+  HelpText<"Check when casting a malloc'ed type T, whether the size is a multiple of the size of T">,
+  DescFile<"CastSizeChecker.cpp">;
 
-def CallAndMessageChecker : Checker<"CallAndMsg">,
-  HelpText<"Check for errors of call and objc message expressions">,
-  DescFile<"CallAndMessageChecker.cpp">;
+def CastToStructChecker : Checker<"CastToStruct">,
+  InGroup<AllExperimental>,
+  HelpText<"Check for cast from non-struct pointer to struct pointer">,
+  DescFile<"CastToStructChecker.cpp">;
 
-def AdjustedReturnValueChecker : Checker<"AdjustRet">,
-  HelpText<"Check to see if the return value of a function call is different than the caller expects">,
-  DescFile<"AdjustedReturnValueChecker.cpp">;
+def FixedAddressChecker : Checker<"FixedAddr">,
+  InGroup<AllExperimental>,
+  HelpText<"Check for assignment of a fixed address to a pointer">,
+  DescFile<"FixedAddressChecker.cpp">;
 
-def AttrNonNullChecker : Checker<"AttrNonNull">,
-  HelpText<"Check for arguments declared to have nonnull attribute">,
-  DescFile<"AttrNonNullChecker.cpp">;
+def PointerArithChecker : Checker<"PointerArithm">,
+  InGroup<AllExperimental>,
+  HelpText<"Check for pointer arithmetic on locations other than array elements">,
+  DescFile<"PointerArithChecker">;
 
-def VLASizeChecker : Checker<"VLASize">,
-  HelpText<"Check for declarations of VLA of undefined or zero size">,
-  DescFile<"VLASizeChecker.cpp">;
+def PointerSubChecker : Checker<"PointerSub">,
+  InGroup<AllExperimental>,
+  HelpText<"Check for pointer subtractions on two pointers pointing to different memory chunks">,
+  DescFile<"PointerSubChecker">;
 
-def DivZeroChecker : Checker<"DivZero">,
-  HelpText<"Check for division by zeros">,
-  DescFile<"DivZeroChecker.cpp">;
+def SizeofPointerChecker : Checker<"SizeofPtr">,
+  InGroup<AllExperimental>,
+  HelpText<"Warn about unintended use of sizeof() on pointer expressions">,
+  DescFile<"CheckSizeofPointer.cpp">;
 
-def ReturnUndefChecker : Checker<"UndefReturn">,
-  HelpText<"Check for undefined or garbage values being returned to the caller">,
-  DescFile<"ReturnUndefChecker.cpp">;
+} // 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">;
 
-def UndefinedArraySubscriptChecker : Checker<"UndefArraySubscript">,
-  HelpText<"Check for undefined array subscripts">,
+} // end "core.builtin"
+
+//===----------------------------------------------------------------------===//
+// Uninitialized values checkers.
+//===----------------------------------------------------------------------===//
+
+let ParentPackage = CoreUninitialized in {
+
+def UndefinedArraySubscriptChecker : Checker<"ArraySubscript">,
+  HelpText<"Check for uninitialized values used as array subscripts">,
   DescFile<"UndefinedArraySubscriptChecker.cpp">;
 
-def UndefinedAssignmentChecker : Checker<"UndefAssign">,
-  HelpText<"Check for assigning undefined values">,
+def UndefinedAssignmentChecker : Checker<"Assign">,
+  HelpText<"Check for assigning uninitialized values">,
   DescFile<"UndefinedAssignmentChecker.cpp">;
 
-def UndefBranchChecker : Checker<"UndefBranch">,
-  HelpText<"Check for undefined branch conditions">,
+def UndefBranchChecker : Checker<"Branch">,
+  HelpText<"Check for uninitialized values used as branch conditions">,
   DescFile<"UndefBranchChecker.cpp">;
 
-def UndefCapturedBlockVarChecker : Checker<"UndefBlockVar">,
+def UndefCapturedBlockVarChecker : Checker<"CapturedBlockVariable">,
   HelpText<"Check for blocks that capture uninitialized values">,
   DescFile<"UndefCapturedBlockVarChecker.cpp">;
+  
+def ReturnUndefChecker : Checker<"UndefReturn">,
+  HelpText<"Check for uninitialized values being returned to the caller">,
+  DescFile<"ReturnUndefChecker.cpp">;
 
-def UndefResultChecker : Checker<"UndefBinOpResult">,
-  HelpText<"Check for undefined results of non-assignment binary operators">,
-  DescFile<"UndefResultChecker.cpp">;
+} // end "core.uninitialized"
 
-def NoReturnFunctionChecker : Checker<"NoReturnFunc">,
-  HelpText<"Evaluate functions that do not return to the caller">,
-  DescFile<"NoReturnFunctionChecker.cpp">;
+//===----------------------------------------------------------------------===//
+// C++ checkers.
+//===----------------------------------------------------------------------===//
 
-def BuiltinFunctionChecker : Checker<"BuiltinFunc">,
-  HelpText<"Evaluate clang builtin functions">,
-  DescFile<"BuiltinFunctionChecker.cpp">;
+let ParentPackage = CplusplusExperimental in {
 
-def StackAddrEscapeChecker : Checker<"StackAddrEscape">,
-  HelpText<"Check that addresses to stack memory do not escape the function">,
-  DescFile<"StackAddrEscapeChecker.cpp">;
+def CStringChecker : Checker<"CString">,
+  InGroup<AllExperimental>,
+  HelpText<"Check calls to functions in <string.h>">,
+  DescFile<"CStringChecker.cpp">;
 
-} // end "core"
+def IteratorsChecker : Checker<"Iterators">,
+  InGroup<AllExperimental>,
+  HelpText<"Check improper uses of STL vector iterators">,
+  DescFile<"IteratorsChecker.cpp">;
+
+} // end: "cplusplus.experimental"
+
+//===----------------------------------------------------------------------===//
+// Deadcode checkers.
+//===----------------------------------------------------------------------===//
 
 let ParentPackage = DeadCode in {
 
@@ -159,157 +197,191 @@ def IdempotentOperationChecker : Checker<"IdempotentOperations">,
 
 } // end DeadCode
 
+let ParentPackage = DeadCodeExperimental in {
+
+def UnreachableCodeChecker : Checker<"UnreachableCode">,
+  InGroup<AllExperimental>,
+  HelpText<"Check unreachable code">,
+  DescFile<"UnreachableCodeChecker.cpp">;
+
+} // end "deadcode.experimental"
+
+//===----------------------------------------------------------------------===//
+// Security checkers.
+//===----------------------------------------------------------------------===//
+
+let ParentPackage = SecurityExperimental in {
+
+def SecuritySyntaxChecker : Checker<"SecuritySyntactic">,
+  HelpText<"Perform quick security API checks that require no data flow">,
+  DescFile<"CheckSecuritySyntaxOnly.cpp">;
+
+def ArrayBoundChecker : Checker<"ArrayBound">,
+  InGroup<AllExperimental>,
+  HelpText<"Warn about buffer overflows (older checker)">,
+  DescFile<"ArrayBoundChecker.cpp">;  
+
+def ArrayBoundCheckerV2 : Checker<"ArrayBoundV2">,
+  InGroup<AllExperimental>,
+  HelpText<"Warn about buffer overflows (newer checker)">,
+  DescFile<"ArrayBoundCheckerV2.cpp">;
+
+def ReturnPointerRangeChecker : Checker<"ReturnPtrRange">,
+  InGroup<AllExperimental>,
+  HelpText<"Check for an out-of-bound pointer being returned to callers">,
+  DescFile<"ReturnPointerRangeChecker.cpp">;
+
+} // end "security.experimental"
+
+//===----------------------------------------------------------------------===//
+// Unix API checkers.
+//===----------------------------------------------------------------------===//
+
+let ParentPackage = Unix in {
+
 def UnixAPIChecker : Checker<"API">,
-  InPackage<Unix>,
   HelpText<"Check calls to various UNIX/Posix functions">,
   DescFile<"UnixAPIChecker.cpp">;
+  
+} // end "unix"
+
+let ParentPackage = UnixExperimental in {
+
+def ChrootChecker : Checker<"Chroot">,
+  InGroup<AllExperimental>,
+  HelpText<"Check improper use of chroot">,
+  DescFile<"ChrootChecker.cpp">;
+
+def MallocChecker : Checker<"Malloc">,
+  InGroup<AllExperimental>,
+  HelpText<"Check for potential memory leaks, double free, and use-after-free problems">,
+  DescFile<"MallocChecker.cpp">;
+
+def PthreadLockChecker : Checker<"PthreadLock">,
+  InGroup<AllExperimental>,
+  HelpText<"Simple lock -> unlock checker">,
+  DescFile<"PthreadLockChecker.cpp">;
+
+def StreamChecker : Checker<"Stream">,
+  InGroup<AllExperimental>,
+  HelpText<"Check stream handling functions">,
+  DescFile<"StreamChecker.cpp">;
+
+} // end "unix.experimental"
+
+//===----------------------------------------------------------------------===//
+// Mac OS X, Cocoa, and Core Foundation checkers.
+//===----------------------------------------------------------------------===//
+
+let ParentPackage = OSX in {
 
 def MacOSXAPIChecker : Checker<"API">,
-  InPackage<MacOSX>,
+  InPackage<OSX>,
   HelpText<"Check for proper uses of various Mac OS X APIs">,
   DescFile<"MacOSXAPIChecker.cpp">;
 
 def OSAtomicChecker : Checker<"AtomicCAS">,
-  InPackage<MacOSX>,
+  InPackage<OSX>,
   HelpText<"Evaluate calls to OSAtomic functions">,
   DescFile<"OSAtomicChecker.cpp">;
 
+} // end "macosx"
+
+let ParentPackage = Cocoa in {
+
+def ObjCSelfInitChecker : Checker<"SelfInit">,
+  HelpText<"Check that 'self' is properly initialized inside an initializer method">,
+  DescFile<"ObjCSelfInitChecker.cpp">;
+
+def ObjCAtSyncChecker : Checker<"AtSync">,
+  HelpText<"Check for null pointers used as mutexes for @synchronized">,
+  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">,
+  HelpText<"Check for passing non-Objective-C types to variadic methods that expect"
+           "only Objective-C types">,
+  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">;
+def NSErrorChecker : Checker<"NSError">,
+  HelpText<"Check usage of NSError** parameters">,
+  DescFile<"NSErrorChecker.cpp">;
+
+} // end "cocoa"
+
+let ParentPackage = CocoaExperimental in {
+
+def ObjCDeallocChecker : Checker<"Dealloc">,
+  InGroup<AllExperimental>,
+  HelpText<"Warn about Objective-C classes that lack a correct implementation of -dealloc">,
+  DescFile<"CheckObjCDealloc.cpp">;
+
+} // end "cocoa.experimental"
+
+let ParentPackage = CoreFoundation in {
+
 def CFNumberCreateChecker : Checker<"CFNumber">,
-  InPackage<MacOSX>,
   HelpText<"Check for proper uses of CFNumberCreate">,
   DescFile<"BasicObjCFoundationChecks.cpp">;
 
 def CFRetainReleaseChecker : Checker<"CFRetainRelease">,
-  InPackage<MacOSX>,
   HelpText<"Check for null arguments to CFRetain/CFRelease">,
   DescFile<"BasicObjCFoundationChecks.cpp">;
 
 def CFErrorChecker : Checker<"CFError">,
-  InPackage<MacOSX>,
   HelpText<"Check usage of CFErrorRef* parameters">,
   DescFile<"NSErrorChecker.cpp">;
+}
+
+//===----------------------------------------------------------------------===//
+// Checkers for LLVM development.
+//===----------------------------------------------------------------------===//
 
 def LLVMConventionsChecker : Checker<"Conventions">,
   InPackage<LLVM>,
   HelpText<"Check code for LLVM codebase conventions">,
   DescFile<"LLVMConventionsChecker.cpp">;
 
+//===----------------------------------------------------------------------===//
+// Debugging checkers (for analyzer development).
+//===----------------------------------------------------------------------===//
+
+let ParentPackage = Debug in {
+
 def LiveVariablesDumper : Checker<"DumpLiveVars">,
-  InPackage<Debug>,
   HelpText<"Print results of live variable analysis">,
   DescFile<"DebugCheckers.cpp">;
 
 def CFGViewer : Checker<"ViewCFG">,
-  InPackage<Debug>,
   HelpText<"View Control-Flow Graphs using GraphViz">,
   DescFile<"DebugCheckers.cpp">;
 
 def CFGDumper : Checker<"DumpCFG">,
-  InPackage<Debug>,
   HelpText<"Display Control-Flow Graphs">,
   DescFile<"DebugCheckers.cpp">;
 
 def AnalyzerStatsChecker : Checker<"Stats">,
-  InPackage<Debug>,
   HelpText<"Emit warnings with analyzer statistics">,
   DescFile<"AnalyzerStatsChecker.cpp">;
 
-//===----------------------------------------------------------------------===//
-// Hidden experimental checkers.
-//===----------------------------------------------------------------------===//
-
-let Group = AllExperimental in {
-
-def ArrayBoundCheckerV2 : Checker<"Overflow">,
-  InPackage<CoreExperimental>,
-  HelpText<"Warn about buffer overflows">,
-  DescFile<"ArrayBoundCheckerV2.cpp">,
-  Hidden; // Must be specified explicitly in order to run.
-
-def MallocChecker : Checker<"Malloc">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check for potential memory leaks, double free, and use-after-free problems">,
-  DescFile<"MallocChecker.cpp">;
-
-def CStringChecker : Checker<"CString">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check calls to functions in <string.h>">,
-  DescFile<"CStringChecker.cpp">;
-
-def UnreachableCodeChecker : Checker<"UnreachableCode">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check unreachable code">,
-  DescFile<"UnreachableCodeChecker.cpp">,
-  Hidden; // Must be specified explicitly in order to run.
-
-def CastToStructChecker : Checker<"CastToStruct">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check for cast from non-struct pointer to struct pointer">,
-  DescFile<"CastToStructChecker.cpp">;
+} // end "debug"
 
-def FixedAddressChecker : Checker<"FixedAddr">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check for assignment of a fixed address to a pointer">,
-  DescFile<"FixedAddressChecker.cpp">;
-
-def PointerArithChecker : Checker<"PointerArithm">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check for pointer arithmetic on locations other than array elements">,
-  DescFile<"PointerArithChecker">;
-
-def PointerSubChecker : Checker<"PointerSub">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check for pointer subtractions on two pointers pointing to different memory chunks">,
-  DescFile<"PointerSubChecker">;
-
-def SizeofPointerChecker : Checker<"SizeofPtr">,
-  InPackage<CoreExperimental>,
-  HelpText<"Warn about unintended use of sizeof() on pointer expressions">,
-  DescFile<"CheckSizeofPointer.cpp">;
-
-def SecuritySyntaxChecker : Checker<"SecuritySyntactic">,
-  InPackage<CoreExperimental>,
-  HelpText<"Perform quick security checks that require no data flow">,
-  DescFile<"CheckSecuritySyntaxOnly.cpp">;
-
-def ReturnPointerRangeChecker : Checker<"ReturnPtrRange">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check for an out-of-bound pointer being returned to callers">,
-  DescFile<"ReturnPointerRangeChecker.cpp">;
-
-def ArrayBoundChecker : Checker<"ArrayBound">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check for an out-of-bound pointer being returned to callers">,
-  DescFile<"ArrayBoundChecker.cpp">;
-
-def CastSizeChecker : Checker<"CastSize">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check when casting a malloc'ed type T, whether the size is a multiple of the size of T">,
-  DescFile<"CastSizeChecker.cpp">;
-
-def ObjCDeallocChecker : Checker<"Dealloc">,
-  InPackage<CocoaExperimental>,
-  HelpText<"Warn about Objective-C classes that lack a correct implementation of -dealloc">,
-  DescFile<"CheckObjCDealloc.cpp">;
-
-def ChrootChecker : Checker<"Chroot">,
-  InPackage<UnixExperimental>,
-  HelpText<"Check improper use of chroot">,
-  DescFile<"ChrootChecker.cpp">;
-
-def PthreadLockChecker : Checker<"PthreadLock">,
-  InPackage<UnixExperimental>,
-  HelpText<"Simple lock -> unlock checker">,
-  DescFile<"PthreadLockChecker.cpp">;
-
-def StreamChecker : Checker<"Stream">,
-  InPackage<UnixExperimental>,
-  HelpText<"Check stream handling functions">,
-  DescFile<"StreamChecker.cpp">;
-
-def IteratorsChecker : Checker<"Iterators">,
-  InPackage<CoreExperimental>,
-  HelpText<"Check improper uses of STL vector iterators">,
-  DescFile<"IteratorsChecker.cpp">;
-
-}
index cbae6c2c535b3410cd0e14d997099391da878678..dd57cd9cbfa1d32f4810712f642dde1e55038716 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,macosx.CFNumber -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,macosx.CFNumber -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,macosx.CFNumber -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,macosx.CFNumber -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.coreFoundation.CFNumber -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.coreFoundation.CFNumber -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.coreFoundation.CFNumber -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.coreFoundation.CFNumber -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s
 
 typedef signed long CFIndex;
 typedef const struct __CFAllocator * CFAllocatorRef;
index 67ea9b3e8f5060547e3c4faac2a6e3f215fd885c..3bc7d8f748e1cf11535cb0aee34dfe02e478ecbf 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cocoa.NSError,macosx.CFError -analyzer-store=basic -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cocoa.NSError,macosx.CFError -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cocoa.NSError,macosx.CFError -analyzer-store=basic -analyzer-constraints=range -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cocoa.NSError,macosx.CFError -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=basic -analyzer-constraints=basic -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -analyzer-constraints=basic -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=basic -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -analyzer-constraints=range -verify %s
 
 
 typedef signed char BOOL;
index 27fd340dd0b2aa91ec56b559151c1a7667deaae6..e7930d1223b7f829b4371479706cd0b2d37dcaa2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=cocoa.experimental.Dealloc '-DIBOutlet=__attribute__((iboutlet))' %s -verify
+// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.experimental.Dealloc '-DIBOutlet=__attribute__((iboutlet))' %s -verify
 typedef signed char BOOL;
 @protocol NSObject
 - (BOOL)isEqual:(id)object;
index 76bf4a147177899caf18ca6335ddc8c6ae9ec654..6ff4bb1e554fba9296fa96825e02e04c15f9fef5 100644 (file)
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=range -verify %s
-// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=basic -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=basic -verify %s
+// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=region -analyzer-constraints=range -verify %s
 
 // ==-- FIXME: -analyzer-store=basic fails on this file (false negatives). --==
-// NOTWORK: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// NOTWORK: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// NOTWORK: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// NOTWORK: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,cocoa.NilArg,macosx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=range -verify %s
+// NOTWORK: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// NOTWORK: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// NOTWORK: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// NOTWORK: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.AtomicCAS,core.experimental -analyzer-store=basic -analyzer-constraints=range -verify %s
 
 //===----------------------------------------------------------------------===//
 // The following code is reduced using delta-debugging from
index 93dae14ea198e0b6095ea33364631f7ae020580e..9778e41d9ced446e7255de16a3d3b9fcee3c2efd 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental -analyzer-checker=cocoa.MethodSigs -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify %s
 
 int printf(const char *, ...);
 
index c3b21f23080701df6c8857d24d154aafd94caf0f..c07150f0ce2acdc1d4f1f9a295063baa49c53097 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental -analyzer-checker=cocoa.experimental.Dealloc %s -verify
+// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental -analyzer-checker=osx.cocoa.experimental.Dealloc %s -verify
 
 // Tests for the checker which checks missing/extra ivar 'release' calls 
 // in dealloc.
index 80ee3a8208e05b1872e930c12bbc843b3d24d787..17d9db6ea23a669d54741909f6c1522824f3f4c9 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.UnreachableCode,core.experimental.Malloc -verify -analyzer-constraints=basic %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.UnreachableCode,core.experimental.Malloc -verify -analyzer-constraints=range %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.experimental.UnreachableCode,unix.experimental.Malloc -verify -analyzer-constraints=basic %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.experimental.UnreachableCode,unix.experimental.Malloc -verify -analyzer-constraints=range %s
 
 // These are used to trigger warnings.
 typedef typeof(sizeof(int)) size_t;
index 75dc10c0e169168934dc4c4878f3560452813a24..37a6f75b3ca2164093883ec5f8849ad2e338cb1c 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental,core.experimental.UnreachableCode -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental,core.experimental.UnreachableCode -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental,deadcode.experimental.UnreachableCode -analyzer-store=region -analyzer-constraints=basic -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental,deadcode.experimental.UnreachableCode -analyzer-store=region -analyzer-constraints=range -verify %s
 
 int string_literal_init() {
   char a[] = "abc";
index a626031fb005884f81edb1369eda1dd2d37624f5..a5d66058215b18801a28559d73a1b52d42c63df5 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.CString -analyzer-store=region -verify %s
-// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,core.experimental.CString -analyzer-store=region -verify %s
-// RUN: %clang_cc1 -analyze -DVARIANT -analyzer-checker=core,core.experimental.CString -analyzer-store=region -verify %s
-// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=core,core.experimental.CString -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.experimental.CString -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,cplusplus.experimental.CString -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -DVARIANT -analyzer-checker=core,cplusplus.experimental.CString -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=core,cplusplus.experimental.CString -analyzer-store=region -verify %s
 
 //===----------------------------------------------------------------------===
 // Declarations
index 22fdc969110639a9aaf7d25d139c7e1eda9bf6b1..8e018e88e9639ea30325b3a020ecf4d4efc264b0 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.UnreachableCode -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.experimental.UnreachableCode -verify %s
 
 // Trigger a warning if the analyzer reaches this point in the control flow.
 #define WARN ((void)*(char*)0)
index cea19841cb4af14c72415354d5f62b2a00ae7972..d57da69ba456b6927dbdada45020ffa540f3028e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-checker=core,core.experimental.Malloc -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-checker=core,unix.experimental.Malloc -fblocks -verify %s
 void free(void *);
 
 void t1 () {
index 240a8bcaf7e8cb76247b1eac49d59a9061ba64b9..c3416f5beac135c7c900ad149366e3657a047675 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.Iterators -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.experimental.Iterators -verify %s
 // XFAIL: win32
 
 #include <vector>
index 95da87284765f8afc8f3f21d7c56d987f4745bb7..c13e15257be0137a3c6be5b5463a26cb3df9876b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.UnreachableCode,core.experimental.CastSize,core.experimental.Malloc -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.experimental.UnreachableCode,core.experimental.CastSize,unix.experimental.Malloc -analyzer-store=region -verify %s
 typedef __typeof(sizeof(int)) size_t;
 void *malloc(size_t);
 void free(void *);
index b365bea6cffb119078986d296fc783a967686c7f..46446af0bc5f12211e1df6050d1c2a79df3da0f2 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental.CastToStruct,core.experimental.ReturnPtrRange,core.experimental.ReturnPtrRange,core.experimental.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental.CastToStruct,core.experimental.ReturnPtrRange,core.experimental.ArrayBound -analyzer-store=region -verify -fblocks   -analyzer-opt-analyze-nested-blocks %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental.CastToStruct,security.experimental.ReturnPtrRange,security.experimental.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental.CastToStruct,security.experimental.ReturnPtrRange,security.experimental.ArrayBound -analyzer-store=region -verify -fblocks   -analyzer-opt-analyze-nested-blocks %s
 
 typedef long unsigned int size_t;
 void *memcpy(void *, const void *, size_t);
index b6cbc2553c18a118d63d8017269a6c0179f06bc4..7ae97fedb3f48e1826bf7475f8eb80115e32d7a7 100644 (file)
@@ -1,12 +1,12 @@
 // NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple reports are not issued.
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-disable-checker=core.experimental.Malloc -analyzer-store=basic -fobjc-gc -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-disable-checker=core.experimental.Malloc -analyzer-store=basic -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-disable-checker=core.experimental.Malloc -analyzer-store=basic -fobjc-gc -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-disable-checker=core.experimental.Malloc -analyzer-store=basic -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-disable-checker=unix.experimental.Malloc -analyzer-store=basic -fobjc-gc -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-disable-checker=unix.experimental.Malloc -analyzer-store=basic -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-disable-checker=unix.experimental.Malloc -analyzer-store=basic -fobjc-gc -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-disable-checker=unix.experimental.Malloc -analyzer-store=basic -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,deadcode.IdempotentOperations,core.experimental,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code %s
 
 #ifndef __clang_analyzer__
 #error __clang__analyzer__ not defined
index 2bcecbade23fd14e292540f0f509b62396575ecb..2d77cc92adf9a45c63492c731e7d1518f54cf551 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental -analyzer-store=basic -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental,unix.experimental,security.experimental.ArrayBound -analyzer-store=basic -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental,unix.experimental,security.experimental.ArrayBound -analyzer-store=region -verify %s
 
 //===----------------------------------------------------------------------===//
 // This file tests cases where we should not flag out-of-bounds warnings.
index 96d55d5d57116498c4d3486312d2ed3318cdb13d..d6eca06571da481205f2fe6b2619371b987e3a1d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,core.experimental.Overflow -verify %s
+// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,security.experimental.ArrayBoundV2 -verify %s
 
 // Tests doing an out-of-bounds access after the end of an array using:
 // - constant integer index
index 5928cdb76a99500ab3abf0fea966c4f8d385f1f2..891719c1932f26b15f0ab02be32ad79528cdce60 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,core.experimental -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,unix.experimental,security.experimental.ArrayBound -analyzer-store=region -verify %s
 
 typedef __typeof(sizeof(int)) size_t;
 void *malloc(size_t);
index 9d7cc9543c92b71f57bed018d83bed81bd7af0c1..5555b018578f0a2bf24203814f5a72d08592f99d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -analyze -analyzer-checker=core,core.experimental -analyzer-store=region %s
+// RUN: %clang_cc1 -verify -analyze -analyzer-checker=core,security.experimental.ArrayBound -analyzer-store=region %s
 
 struct tea_cheese { unsigned magic; };
 typedef struct tea_cheese kernel_tea_cheese_t;
index 66e978969cb8248873d3737888170c2cda697a24..cbf00a27721d8da7ccfcd261980541994bd1d6c2 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cocoa.NSAutoreleasePool -analyzer-store=basic -verify -fobjc-gc-only -fblocks %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cocoa.NSAutoreleasePool -analyzer-store=region -fobjc-gc-only -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSAutoreleasePool -analyzer-store=basic -verify -fobjc-gc-only -fblocks %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSAutoreleasePool -analyzer-store=region -fobjc-gc-only -fblocks -verify %s
 
 //===----------------------------------------------------------------------===//
 // Header stuff.
index 0a0ffc6ac00b7183f9d9332413c91808e2bd50df..2a1d187d56372bec0f71b4ca68feacc50357cb8b 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,macosx.CFRetainRelease,cocoa.ClassRelease -analyzer-store=basic -fblocks -verify %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,macosx.CFRetainRelease,cocoa.ClassRelease -analyzer-store=region -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease -analyzer-store=basic -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease -analyzer-store=region -fblocks -verify %s
 
 #if __has_feature(attribute_ns_returns_retained)
 #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
index f129e8a8e5acbf4e17f79aa3cdf7f9399da5b600..4e37c44247c2e4a7b412c30175bcc890fc1c964d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-pc-linux-gnu -analyze -analyzer-checker=core.experimental.SecuritySyntactic %s -verify
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -analyze -analyzer-checker=security.experimental.SecuritySyntactic %s -verify
 
 // This file complements 'security-syntax-checks.m', but tests that we omit
 // specific checks on platforms where they don't make sense.
index bac6ee89df905dd214415775248a68b4c0e1422c..e08b08bff745b7ac305f3fd9c784676c4050e0a0 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core.experimental.SecuritySyntactic %s -verify
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=security.experimental.SecuritySyntactic %s -verify
 
 // <rdar://problem/6336718> rule request: floating point used as loop 
 //  condition (FLP30-C, FLP-30-CPP)
index de5109fa4cb8ea8bceec0ba59ec38ac807259872..35701c43e53d799ba9e42392d3bb6db8d9b605d7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=cocoa.SelfInit %s -verify
+// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.SelfInit %s -verify
 
 @class NSZone, NSCoder;
 @protocol NSObject
index 33d409b8472d46ddaff0c2322cf83bb74dd04066..430145fc4c3f99fa5de4655e5f9036c4b86185da 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental.CString,core.experimental.UnreachableCode -analyzer-store=region -verify %s
-// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,core.experimental.CString,core.experimental.UnreachableCode -analyzer-store=region -verify %s
-// RUN: %clang_cc1 -analyze -DVARIANT -analyzer-checker=core,core.experimental.CString,core.experimental.UnreachableCode -analyzer-store=region -verify %s
-// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=core,core.experimental.CString,core.experimental.UnreachableCode -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.experimental.CString,deadcode.experimental.UnreachableCode -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,cplusplus.experimental.CString,deadcode.experimental.UnreachableCode -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -DVARIANT -analyzer-checker=core,cplusplus.experimental.CString,deadcode.experimental.UnreachableCode -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=core,cplusplus.experimental.CString,deadcode.experimental.UnreachableCode -analyzer-store=region -verify %s
 
 //===----------------------------------------------------------------------===
 // Declarations
index 7ab1476bffdbfc112462740c1a950cabd2036b8f..df124b10d10e56f33074937f139276afe3fa6356 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.experimental,core.uninitialized -analyzer-store=region -verify %s
 typedef __typeof(sizeof(int)) size_t;
 void *malloc(size_t);
 void free(void *);
index a7ceadc4bdb004ba94dc1e4b96ef87dc827fbc4d..5df6b37bb91a34b4dd07c4a4f8c1d419d5928f87 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=unix.API,macosx.API %s -analyzer-store=region -fblocks -verify
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=unix.API,macosx.API %s -analyzer-store=basic -fblocks -verify
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=unix.API,osx.API %s -analyzer-store=region -fblocks -verify
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=unix.API,osx.API %s -analyzer-store=basic -fblocks -verify
 
 struct _opaque_pthread_once_t {
   long __sig;
index 9dcc1caeca3e0c3a2c9f8c013b02eafb3ab70509..7df52402e735746b4bf88c9409789752c17f258d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,core.experimental.UnreachableCode -verify -analyzer-opt-analyze-nested-blocks -Wno-unused-value %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,deadcode.experimental.UnreachableCode -verify -analyzer-opt-analyze-nested-blocks -Wno-unused-value %s
 
 extern void foo(int a);
 
index b43ae18694ddef86b31fad316aa3026b29739833..931c84a3745ad50ca6f39ddddac2ac261e0031d5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -analyze -analyzer-checker=cocoa.UnusedIvars %s -verify
+// RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -analyze -analyzer-checker=osx.cocoa.UnusedIvars %s -verify
 
 //===--- BEGIN: Delta-debugging reduced headers. --------------------------===//
 
index 1f8f6b448cae520ef253ce20b95e63733bdce9bd..607154d32eb6c8eb80cbbfdfd09a41c526bfd76f 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,cocoa.VariadicMethodTypes -analyzer-store=basic -fblocks -verify %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,cocoa.VariadicMethodTypes -analyzer-store=region -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.VariadicMethodTypes -analyzer-store=basic -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.VariadicMethodTypes -analyzer-store=region -fblocks -verify %s
 
 //===----------------------------------------------------------------------===//
 // The following code is reduced using delta-debugging from