• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -analyzer-checker=core -verify %s -Wno-incomplete-implementation
2typedef 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;  // expected-note {{method 'performAction:withSelection:' declared here}}
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
75@implementation XCPerspectiveModule // expected-warning {{method 'performAction:withSelection:' in protocol 'PBXSelectionTarget' not implemented}}}
76+ (void) openForProjectDocument:(PBXProjectDocument *)projectDocument {
77}
78- (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer  matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data {
79  NSArray *allItems = [_perspectivesTabView tabViewItems];
80  NSInteger i, c = [allItems count];
81  for (i = 0;
82       i < c;
83       i++) {
84    NSTabViewItem *item = [allItems objectAtIndex:i];
85    if ([[item label] isEqual:perspectiveIdentifer]) {
86      PBXProjectModule *pModule = (PBXProjectModule *)[self moduleForTab:item];
87      PBXModule *obj = [XCFindPossibleKeyModules(pModule, (BOOL)0) objectOfType:type     matchingFunction:comparator usingData:data];
88    }
89  }
90  return 0;
91}
92- (BOOL)buffer:(char *)buf containsAnyPrompts:(char *[])prompts
93{
94 prompts++;
95 return (BOOL)0;
96}
97@end
98