aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-01-30 21:14:16 +0000
committerAnna Zaks <ganna@apple.com>2012-01-30 21:14:16 +0000
commit7fc800356f3c86a0c63e94353d7a1ac5a0ffbf66 (patch)
treee15e426043a03d7eee1b5bf172e7158a7f9765d4
parentce3aa395240207fd1cfa11342fd4b9fd46d6b025 (diff)
[analyzer] Rename the checker as per Ted's comment. Remove the reference
from the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149276 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/Tools.cpp1
-rw-r--r--lib/StaticAnalyzer/Checkers/Checkers.td10
-rw-r--r--test/Analysis/CFContainers.mm2
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e01b5f2a10..97c3c69709 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1352,7 +1352,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-analyzer-checker=deadcode");
// Enable the following experimental checkers for testing.
- CmdArgs.push_back("-analyzer-checker=experimental.osx.cocoa.ContainerAPI");
CmdArgs.push_back("-analyzer-checker=security.insecureAPI.UncheckedReturn");
CmdArgs.push_back("-analyzer-checker=security.insecureAPI.getpw");
CmdArgs.push_back("-analyzer-checker=security.insecureAPI.gets");
diff --git a/lib/StaticAnalyzer/Checkers/Checkers.td b/lib/StaticAnalyzer/Checkers/Checkers.td
index e8be816de4..b713d5d331 100644
--- a/lib/StaticAnalyzer/Checkers/Checkers.td
+++ b/lib/StaticAnalyzer/Checkers/Checkers.td
@@ -39,6 +39,7 @@ def OSXExperimental : Package<"osx">, InPackage<Experimental>, Hidden;
def Cocoa : Package<"cocoa">, InPackage<OSX>;
def CocoaExperimental : Package<"cocoa">, InPackage<OSXExperimental>, Hidden;
def CoreFoundation : Package<"coreFoundation">, InPackage<OSX>;
+def Containers : Package<"Containers">, InPackage<CoreFoundation>;
def LLVM : Package<"llvm">;
def Debug : Package<"debug">;
@@ -364,10 +365,6 @@ def RetainCountChecker : Checker<"RetainCount">,
HelpText<"Check for leaks and improper reference count management">,
DescFile<"RetainCountChecker.cpp">;
-def ObjCContainersASTChecker : Checker<"CFContainersSyntax">,
- HelpText<"Check for common pitfalls when using 'CFArray', 'CFDictionary', 'CFSet' APIs">,
- DescFile<"ObjCContainersASTChecker.cpp">;
-
} // end "cocoa"
let ParentPackage = CocoaExperimental in {
@@ -401,6 +398,11 @@ def CFErrorChecker : Checker<"CFError">,
DescFile<"NSErrorChecker.cpp">;
}
+let ParentPackage = Containers in {
+def ObjCContainersASTChecker : Checker<"PointerSizedValues">,
+ HelpText<"Warns if 'CFArray', 'CFDictionary', 'CFSet' are created with non-pointer-size values">,
+ DescFile<"ObjCContainersASTChecker.cpp">;
+}
//===----------------------------------------------------------------------===//
// Checkers for LLVM development.
//===----------------------------------------------------------------------===//
diff --git a/test/Analysis/CFContainers.mm b/test/Analysis/CFContainers.mm
index 836614070e..5243c15817 100644
--- a/test/Analysis/CFContainers.mm
+++ b/test/Analysis/CFContainers.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.CFContainersSyntax,experimental.osx.cocoa.Containers -analyzer-store=region -triple x86_64-apple-darwin -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=osx.coreFoundation.Containers.PointerSizedValues,experimental.osx.cocoa.Containers -analyzer-store=region -triple x86_64-apple-darwin -verify %s
typedef const struct __CFAllocator * CFAllocatorRef;
typedef const struct __CFString * CFStringRef;