From: Anna Zaks Date: Mon, 30 Jan 2012 21:14:16 +0000 (+0000) Subject: [analyzer] Rename the checker as per Ted's comment. Remove the reference X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fc800356f3c86a0c63e94353d7a1ac5a0ffbf66;p=clang [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 --- 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, Hidden; def Cocoa : Package<"cocoa">, InPackage; def CocoaExperimental : Package<"cocoa">, InPackage, Hidden; def CoreFoundation : Package<"coreFoundation">, InPackage; +def Containers : Package<"Containers">, InPackage; 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;