blob: d4914fd895f9a6f1cf65eec9292a07a80fe6c636 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Steve Naroff3ac438c2008-06-04 20:36:13 +00002typedef signed char BOOL;
3typedef unsigned int NSUInteger;
4typedef 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
25typedef float CGFloat;
26typedef struct { int a; } NSFastEnumerationState;
27
28@protocol NSFastEnumeration
29- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len;
30@end
31
32typedef 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
42extern 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
64NSString *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