| 1 |
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s |
| 2 |
|
| 3 |
// Delta-Debugging reduced preamble. |
| 4 |
typedef signed char BOOL; |
| 5 |
typedef unsigned int NSUInteger; |
| 6 |
@class NSString, Protocol; |
| 7 |
extern void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2))); |
| 8 |
typedef 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 |
| 17 |
extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone); |
| 18 |
@interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value; @end |
| 19 |
@class NSString, NSData; |
| 20 |
typedef 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 |
| 26 |
extern NSString * const NSBundleDidLoadNotification; |
| 27 |
typedef struct {} NSDecimal; |
| 28 |
@interface NSNetService : NSObject {} - (id)init; @end |
| 29 |
extern NSString * const NSUndoManagerCheckpointNotification; |
| 30 |
|
| 31 |
int main (int argc, const char * argv[]) { |
| 32 |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; |
| 33 |
id someUnintializedPointer = [someUnintializedPointer objectAtIndex:0]; // expected-warning{{Receiver in message expression is an uninitialized value}} |
| 34 |
NSLog(@"%@", someUnintializedPointer); |
| 35 |
[pool drain]; |
| 36 |
return 0; |
| 37 |
} |