// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,osx.cocoa.RetainCount,deadcode -verify -fblocks -fobjc-arc -analyzer-output=plist-multi-file -analyzer-config deadcode.DeadStores:ShowFixIts=true -o %t.plist %s
// RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/objc-arc.m.plist -
typedef signed char BOOL;
typedef struct _NSZone NSZone;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
typedef unsigned long NSUInteger;
@protocol NSCoding;
@protocol NSMutableCopying;
@protocol NSMutableCopying - mutableCopyWithZone: zone;
@end
@protocol NSCoding - encodeWithCoder: aCoder;
@end
typedef const struct __CFAllocator * CFAllocatorRef;
extern const CFAllocatorRef kCFAllocatorDefault;
typedef double CFTimeInterval;
typedef CFTimeInterval CFAbsoluteTime;
extern CFAbsoluteTime ;
typedef const struct __CFDate * CFDateRef;
extern CFDateRef ;
typedef const void* objc_objectptr_t;
id ;
id ;
// Test the analyzer is working at all.
void
// Test that in ARC mode that blocks are correctly automatically copied
// and not flagged as warnings by the analyzer.
typedef void ;
void ;
Block
Block
Block global_block;
void
// Test that Objective-C pointers are null initialized.
void
// Test that we don't flag leaks of Objective-C objects.
void
// Test that CF allocations are still caught as leaks.
void
// Test that 'init' methods do not try to claim ownerhip of an *unowned* allocated object
// in ARC mode.
// Test that dead store checking works in the prescence of "cleanups" in the AST.
void
// Test
typedef const void *CFTypeRef;
typedef const struct __CFString *CFStringRef;
CFTypeRef ;
CFStringRef ;
CFTypeRef ;
CFStringRef ;
id ;
NSString *;
void
void
void
void
// Previously this resulted in a "return of stack address" warning.
id
void
// <rdar://problem/11059275> - dispatch_set_context and ARC.
CFTypeRef ;
typedef void* dispatch_object_t;
void ;
void
void
void
id
id
typedef const void * CFTypeRef;
typedef const struct __CFString * CFStringRef;
typedef const struct __CFAllocator * CFAllocatorRef;
extern const CFAllocatorRef kCFAllocatorDefault;
extern CFTypeRef ;
extern void ;
void
@interface A;
@end
void
;