diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
commit | be1de4be954c80875ad4108e0a33e8e131b2f2c0 (patch) | |
tree | 1fbbecf276bf7c7bdcbb4dd446099d6d90eaa516 /clang/test/SemaObjC/interface-scope-2.m | |
parent | c4626a62754862d20b41e8a46a3574264ea80e6d (diff) | |
parent | f1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff) |
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/test/SemaObjC/interface-scope-2.m')
-rw-r--r-- | clang/test/SemaObjC/interface-scope-2.m | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/interface-scope-2.m b/clang/test/SemaObjC/interface-scope-2.m new file mode 100644 index 0000000..60fd900 --- /dev/null +++ b/clang/test/SemaObjC/interface-scope-2.m @@ -0,0 +1,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 |