summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/interface-scope-2.m
blob: 60fd900285d059f28586d4a9520cc77317b1e8bb (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -Wno-objc-root-class %s
// FIXME: must also compile as Objective-C++ 

// <rdar://problem/6487662>
typedef struct objc_selector *SEL;
typedef signed char BOOL;
typedef unsigned int NSUInteger;
typedef struct _NSZone NSZone;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
@protocol NSObject
- (BOOL)isEqual:(id)object;
- (BOOL)respondsToSelector:(SEL)aSelector;
@end
@protocol NSCopying
- (id)copyWithZone:(NSZone *)zone;
@end
@protocol NSMutableCopying
- (id)mutableCopyWithZone:(NSZone *)zone;
@end
@protocol NSCoding
- (void)encodeWithCoder:(NSCoder *)aCoder;
@end
@interface NSObject <NSObject> {}
@end
@class NSString, NSData;
typedef struct _NSPoint {}
NSRange;
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
- (NSUInteger)length;
@end
@interface NSMutableString : NSString
- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString;
@end
@class NSArray, NSDictionary, NSMapTable;
@interface NSResponder : NSObject <NSCoding> {}
@end
@protocol NSAnimatablePropertyContainer
- (id)animator;
@end
extern NSString *NSAnimationTriggerOrderIn ;
@interface NSView : NSResponder  <NSAnimatablePropertyContainer>  {
  struct __VFlags2 {} _vFlags2;
}
@end
@class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
@interface FooiagramView : NSView {
id _delegate;
}
@end
@class FooiagramView;
@interface _FooiagramViewReserved : NSObject {
@public
  NSMutableString *_typeToSelectString;
  struct _FooiagramViewFlags {
      unsigned int delegateRespondsToPrintInfoForBarView : 1;
  } _dvFlags;
}
@end
extern _FooiagramViewReserved *_FooiagramViewBarViewReserved(FooiagramView *BarView);
@interface FooiagramView (FooiagramViewPrivate)
+ (Class)_defaultBarToolManagerClass;
@end
@implementation FooiagramView
static NSMapTable *_defaultMenuForClass = 0;
- (void)setDelegate:(id)delegate {
  if (_delegate != delegate) {
    struct _FooiagramViewFlags *dvFlags =
      &_FooiagramViewBarViewReserved(self)->_dvFlags;
    if (_delegate != ((void *)0)) {
      dvFlags->delegateRespondsToPrintInfoForBarView = [_delegate respondsToSelector:@selector(printInfoForBarView:)];
    }
  }
}
@end

// <rdar://problem/6487684>
@interface WizKing_MIKeep {
struct __LoreStuffNode *_historyStuff;
}
@end
typedef struct __LoreStuffNode {} LoreStuffNode;
@implementation WizKing_MIKeep
- init {
  LoreStuffNode *node;
  node = &(_historyStuff[1]);
  return 0;
}
@end

// <rdar://problem/6487702>
typedef long unsigned int __darwin_size_t;
typedef __darwin_size_t size_t;
void *memset(void *, int, size_t);
@class NSString, NSURL, NSError;
@interface OingoWerdnaPeon : NSObject {}
@end        typedef enum {
OingoPT_SmashOK,     OingoPT_NoSuchFile, }
OingoWerdnaPeonIOMethod;
@interface OingoWerdnaPeonSmashDrivel : NSObject <NSCopying> {}
@end
@interface OingoBoingoContraptionPeon : OingoWerdnaPeon {
struct _OingoBoingoContraptionPeonFlags {}
_nfttFlags;
}
@end
@implementation OingoBoingoContraptionPeon
+ (void)initialize {}
- (id)initWithSmashDrivel:(OingoWerdnaPeonSmashDrivel *)info {
  if (self != ((void *)0)) {
    (void)memset(&_nfttFlags, 0, sizeof(struct _OingoBoingoContraptionPeonFlags));
  }
  return 0;
}
@end

@interface Blah {
  struct X {
    int x;
  } value;
}
@end

@implementation Blah
- (int)getValue {
  struct X *xp = &value;
  return xp->x;
}
@end