1// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -analyzer-store=basic %s 2// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -analyzer-store=region %s 3 4// Delta-Debugging reduced preamble. 5typedef signed char BOOL; 6typedef unsigned int NSUInteger; 7@class NSString, Protocol; 8extern void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2))); 9typedef struct _NSZone NSZone; 10@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; 11@protocol NSObject - (BOOL)isEqual:(id)object; @end 12@protocol NSCopying - (id)copyWithZone:(NSZone *)zone; @end 13@protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; @end 14@interface NSObject <NSObject> {} 15+ (id)alloc; 16- (id)init; 17@end 18extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone); 19@interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value; @end 20@class NSString, NSData; 21typedef struct _NSPoint {} NSRange; 22@interface NSValue (NSValueRangeExtensions) 23+ (NSValue *)valueWithRange:(NSRange)range; 24- (id)objectAtIndex:(NSUInteger)index; 25@end 26@interface NSAutoreleasePool : NSObject {} - (void)drain; @end 27extern NSString * const NSBundleDidLoadNotification; 28typedef struct {} NSDecimal; 29@interface NSNetService : NSObject {} - (id)init; @end 30extern NSString * const NSUndoManagerCheckpointNotification; 31 32// Test case: <rdar://problem/6145427> 33 34int main (int argc, const char * argv[]) { 35 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 36 id someUnintializedPointer = [someUnintializedPointer objectAtIndex:0]; // expected-warning{{Receiver in message expression is an uninitialized value}} 37 NSLog(@"%@", someUnintializedPointer); 38 [pool drain]; 39 return 0; 40} 41