// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -analyzer-checker=deadcode.DeadStores,osx.cocoa.RetainCount -fblocks -verify -Wno-objc-root-class %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
typedef struct _NSZone NSZone;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
@protocol NSObject - isEqual: object; @end
@protocol NSCopying - copyWithZone: zone; @end
@protocol NSCoding - encodeWithCoder: aCoder; @end
extern id ;
@interface NSValue : NSObject <NSCopying, NSCoding> - getValue: value; @end
typedef float CGFloat;
typedef struct _NSPoint NSRange;
@interface NSValue + valueWithRange: range;
- containsObject: anObject;
@end
@class NSURLAuthenticationChallenge;
@class NSArray, NSDictionary, NSString;
extern NSString *NSAlignmentBinding;
// This test case was reported as a false positive due to a bug in the
// LiveVariables <-> deadcode.DeadStores interplay. We should not flag a warning
// here. The test case was reported in:
// http://lists.llvm.org/pipermail/cfe-dev/2008-July/002157.html
void
// This test case was a false positive due to how clang models
// pointer types and ObjC object pointer types differently. Here
// we don't warn about a dead store because 'nil' is assigned to
// an object pointer for the sake of defensive programming.
void
// This test case issuing a bogus warning for the declaration of 'isExec'
// because the compound statement for the @synchronized was being visited
// twice by the LiveVariables analysis.
BOOL ;
void ;
// Don't flag dead stores to assignments to self within a nested assignment.
// Don't flag dead stores when a variable is captured in a block used
// by a property access.
RDar10591355 *;
void
id ;
void