From: Devin Coughlin Date: Tue, 3 Nov 2015 19:38:03 +0000 (+0000) Subject: [analyzer] Move the ObjCGenericsChecker out of the alpha package. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c29653a59e47624ec37f4e607976449fb975f44;p=clang [analyzer] Move the ObjCGenericsChecker out of the alpha package. It is now in the osx.cocoa package and so will be on by default for Apple toolchains. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251966 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/Checkers.td b/lib/StaticAnalyzer/Checkers/Checkers.td index 03d09d3bf7..861f9abc1e 100644 --- a/lib/StaticAnalyzer/Checkers/Checkers.td +++ b/lib/StaticAnalyzer/Checkers/Checkers.td @@ -457,6 +457,10 @@ def RetainCountChecker : Checker<"RetainCount">, HelpText<"Check for leaks and improper reference count management">, DescFile<"RetainCountChecker.cpp">; +def ObjCGenericsChecker : Checker<"ObjCGenerics">, + HelpText<"Check for type errors when using Objective-C generics">, + DescFile<"DynamicTypePropagation.cpp">; + } // end "osx.cocoa" let ParentPackage = CocoaAlpha in { @@ -481,10 +485,6 @@ def DirectIvarAssignmentForAnnotatedFunctions : Checker<"DirectIvarAssignmentFor HelpText<"Check for direct assignments to instance variables in the methods annotated with objc_no_direct_instance_variable_assignment">, DescFile<"DirectIvarAssignment.cpp">; -def ObjCGenericsChecker : Checker<"ObjCGenerics">, - HelpText<"Check for type errors when using Objective-C generics">, - DescFile<"DynamicTypePropagation.cpp">; - def NonLocalizedStringChecker : Checker<"NonLocalizedStringChecker">, HelpText<"Warns about uses of non-localized NSStrings passed to UI methods expecting localized NSStrings">, DescFile<"LocalizationChecker.cpp">; diff --git a/test/Analysis/DynamicTypePropagation.m b/test/Analysis/DynamicTypePropagation.m index efba471f52..79ef37c794 100644 --- a/test/Analysis/DynamicTypePropagation.m +++ b/test/Analysis/DynamicTypePropagation.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.ObjCGenerics -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics -verify %s #if !__has_feature(objc_generics) # error Compiler does not support Objective-C generics? diff --git a/test/Analysis/generics.m b/test/Analysis/generics.m index 4d4fb1005e..b64d06935d 100644 --- a/test/Analysis/generics.m +++ b/test/Analysis/generics.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -analyzer-output=plist -o %t.plist +// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -analyzer-output=plist -o %t.plist // RUN: FileCheck --input-file %t.plist %s #if !__has_feature(objc_generics)