Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -checker-cfref -verify %s |
Steve Naroff | d82565f | 2008-12-09 20:59:16 +0000 | [diff] [blame] | 2 | typedef signed char BOOL; |
| 3 | typedef int NSInteger; |
| 4 | typedef unsigned int NSUInteger; |
| 5 | typedef 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; |
| 16 | typedef struct { |
| 17 | } |
| 18 | NSFastEnumerationState; |
| 19 | @protocol NSFastEnumeration - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len; |
| 20 | @end @class NSString; |
| 21 | typedef 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 { |
| 46 | PBXNoItemChanged = 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 { |
| 51 | PBXFindMatchContains, 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; |
| 61 | extern 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 Jahanian | 63e963c | 2009-11-16 18:57:01 +0000 | [diff] [blame] | 75 | @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 Naroff | d82565f | 2008-12-09 20:59:16 +0000 | [diff] [blame] | 78 | + (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 Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 92 | return 0; |
Steve Naroff | d82565f | 2008-12-09 20:59:16 +0000 | [diff] [blame] | 93 | } |
| 94 | - (BOOL)buffer:(char *)buf containsAnyPrompts:(char *[])prompts |
| 95 | { |
| 96 | prompts++; |
| 97 | return (BOOL)0; |
| 98 | } |
Fariborz Jahanian | 63e963c | 2009-11-16 18:57:01 +0000 | [diff] [blame] | 99 | @end |