blob: e81bcdf7b75fec5b4feadf55322205b29850f15a [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -checker-cfref -verify %s
Steve Naroffd82565f2008-12-09 20:59:16 +00002typedef signed char BOOL;
3typedef int NSInteger;
4typedef unsigned int NSUInteger;
5typedef struct _NSZone NSZone;
6@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
7@protocol NSObject - (BOOL)isEqual:(id)object;
8@end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone;
9@end @protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone;
10@end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder;
11@end @interface NSObject <NSObject> {
12}
13@end extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
14@interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value;
15@end @class NSString, NSData, NSMutableData, NSMutableDictionary, NSMutableArray;
16typedef struct {
17}
18 NSFastEnumerationState;
19@protocol NSFastEnumeration - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len;
20@end @class NSString;
21typedef struct _NSRange {
22}
23 NSRange;
24@interface NSValue (NSValueRangeExtensions) + (NSValue *)valueWithRange:(NSRange)range;
25- (id)objectAtIndex:(NSUInteger)index;
26@end typedef unsigned short unichar;
27@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding> - (NSUInteger)length;
28@end @class NSArray, NSDictionary, NSString, NSError;
29@interface NSSet : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration> - (NSUInteger)count;
30@end extern NSString *NSAccessibilityRoleDescription(NSString *role, NSString *subrole) ;
31@interface NSResponder : NSObject <NSCoding> {
32}
33@end @protocol NSAnimatablePropertyContainer - (id)animator;
34@end extern NSString *NSAnimationTriggerOrderIn ;
35@interface NSView : NSResponder <NSAnimatablePropertyContainer> {
36}
37@end @class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
38@interface NSWindowController : NSResponder <NSCoding> {
39}
40@end @class NSArray, NSFont, NSTabViewItem;
41@interface NSTabView : NSView {
42}
43- (NSArray *)tabViewItems;
44- (NSString *)label;
45@end typedef enum {
46PBXNoItemChanged = 0x00, PBXProjectItemChanged = 0x01, PBXReferenceChanged = 0x02, PBXGroupChanged = 0x04, PBXTargetChanged = 0x08, PBXBuildPhaseChanged = 0x10, PBXBuildFileChanged = 0x20, PBXBreakpointChanged = 0x40, }
47 PBXArchiveMask;
48@interface PBXModule : NSWindowController {
49}
50@end typedef enum {
51PBXFindMatchContains, PBXFindMatchStartsWith, PBXFindMatchWholeWords, PBXFindMatchEndsWith }
52 PBXFindMatchStyle;
53@protocol PBXSelectableText - (NSString *)selectedString;
54@end @protocol PBXFindableText <PBXSelectableText> - (BOOL)findText:(NSString *)string ignoreCase:(BOOL)ignoreCase matchStyle:(PBXFindMatchStyle)matchStyle backwards:(BOOL)backwards wrap:(BOOL)wrap;
55@end @class PBXProjectDocument, PBXProject, PBXAttributedStatusView;
56@interface PBXProjectModule : PBXModule <PBXFindableText> {
57}
58@end @class PBXBookmark;
59@protocol PBXSelectionTarget - (NSObject <PBXSelectionTarget> *) performAction:(id)action withSelection:(NSArray *)selection;
60@end @class XCPropertyDictionary, XCPropertyCondition, XCPropertyConditionSet, XCMutablePropertyConditionSet;
61extern NSMutableArray *XCFindPossibleKeyModules(PBXModule *module, BOOL useExposedModulesOnly);
62@interface NSString (StringUtilities) - (NSString *) trimToLength:(NSInteger)length preserveRange:(NSRange)range;
63- (id) objectOfType:(Class)type matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data;
64@end @class XCControlView;
65@protocol XCDockViewHeader - (NSImage *) headerImage;
66@end @class XCDockableTabModule;
67@interface XCExtendedTabView : NSTabView <XCDockViewHeader> {
68}
69@end @class PBXProjectDocument, PBXFileReference, PBXModule, XCWindowTool;
70@interface XCPerspectiveModule : PBXProjectModule <PBXSelectionTarget> {
71 XCExtendedTabView *_perspectivesTabView;
72}
73- (PBXModule *) moduleForTab:(NSTabViewItem *)item;
74@end
Fariborz Jahanian63e963c2009-11-16 18:57:01 +000075@implementation XCPerspectiveModule // expected-warning {{method definition for 'moduleForTab:' not found}} \
76 // expected-warning {{method definition for 'performAction:withSelection:' not found}} \
77 // expected-warning {{incomplete implementation}}
Steve Naroffd82565f2008-12-09 20:59:16 +000078+ (void) openForProjectDocument:(PBXProjectDocument *)projectDocument {
79}
80- (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data {
81 NSArray *allItems = [_perspectivesTabView tabViewItems];
82 NSInteger i, c = [allItems count];
83 for (i = 0;
84 i < c;
85 i++) {
86 NSTabViewItem *item = [allItems objectAtIndex:i];
87 if ([[item label] isEqual:perspectiveIdentifer]) {
88 PBXProjectModule *pModule = (PBXProjectModule *)[self moduleForTab:item];
89 PBXModule *obj = [XCFindPossibleKeyModules(pModule, (BOOL)0) objectOfType:type matchingFunction:comparator usingData:data];
90 }
91 }
Mike Stumpd1969d82009-07-22 00:43:08 +000092 return 0;
Steve Naroffd82565f2008-12-09 20:59:16 +000093}
94- (BOOL)buffer:(char *)buf containsAnyPrompts:(char *[])prompts
95{
96 prompts++;
97 return (BOOL)0;
98}
Fariborz Jahanian63e963c2009-11-16 18:57:01 +000099@end