Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Steve Naroff | 3ac438c | 2008-06-04 20:36:13 +0000 | [diff] [blame] | 2 | typedef signed char BOOL; |
| 3 | typedef unsigned int NSUInteger; |
| 4 | typedef struct _NSZone NSZone; |
| 5 | @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; |
| 6 | |
| 7 | @protocol NSObject |
| 8 | - (BOOL)isEqual:(id)object; |
| 9 | @end |
| 10 | |
| 11 | @protocol NSCopying |
| 12 | - (id)copyWithZone:(NSZone *)zone; |
| 13 | @end |
| 14 | |
| 15 | @protocol NSMutableCopying |
| 16 | - (id)mutableCopyWithZone:(NSZone *)zone; |
| 17 | @end |
| 18 | |
| 19 | @protocol NSCoding |
| 20 | - (void)encodeWithCoder:(NSCoder *)aCoder; |
| 21 | @end |
| 22 | |
| 23 | @interface NSObject <NSObject> {} @end |
| 24 | |
| 25 | typedef float CGFloat; |
| 26 | typedef struct { int a; } NSFastEnumerationState; |
| 27 | |
| 28 | @protocol NSFastEnumeration |
| 29 | - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len; |
| 30 | @end |
| 31 | |
| 32 | typedef unsigned short unichar; |
| 33 | |
| 34 | @interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding> |
| 35 | - (NSUInteger)length; |
| 36 | @end |
| 37 | |
| 38 | @interface NSSimpleCString : NSString {} @end |
| 39 | |
| 40 | @interface NSConstantString : NSSimpleCString @end |
| 41 | |
| 42 | extern void *_NSConstantStringClassReference; |
| 43 | |
| 44 | @interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration> |
| 45 | - (NSUInteger)count; |
| 46 | @end |
| 47 | |
| 48 | @interface NSMutableDictionary : NSDictionary |
| 49 | - (void)removeObjectForKey:(id)aKey; |
| 50 | @end |
| 51 | |
| 52 | @class NSArray, NSSet, NSHashTable; |
| 53 | |
| 54 | @protocol PBXTrackableTask <NSObject> |
| 55 | - (float) taskPercentComplete; |
| 56 | - taskIdentifier; |
| 57 | @end |
| 58 | |
| 59 | @interface PBXTrackableTaskManager : NSObject { |
| 60 | NSMutableDictionary *_trackableTasks; |
| 61 | } |
| 62 | @end |
| 63 | |
| 64 | NSString *XCExecutableDebugTaskIdentifier = @"XCExecutableDebugTaskIdentifier"; |
| 65 | |
| 66 | @implementation PBXTrackableTaskManager |
| 67 | - (id) init {} |
| 68 | - (void) unregisterTask:(id <PBXTrackableTask>) task { |
| 69 | @synchronized (self) { |
| 70 | id taskID = [task taskIdentifier]; |
| 71 | id task = [_trackableTasks objectForKey:taskID]; // expected-warning{{method '-objectForKey:' not found (return type defaults to 'id')}} |
| 72 | } |
| 73 | } |
| 74 | @end |
| 75 | |