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