71 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s2// expected-no-diagnostics3# 1 "<command line>"4# 1 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 1 35typedef signed char BOOL;6typedef unsigned int NSUInteger;7typedef struct _NSZone NSZone;8 9@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;10 11@protocol NSObject12- (BOOL)isEqual:(id)object;13+ class;14@end15 16@protocol NSCopying 17- (id)copyWithZone:(NSZone *)zone;18@end19 20@protocol NSMutableCopying21- (id)mutableCopyWithZone:(NSZone *)zone;22@end23 24@protocol NSCoding25- (void)encodeWithCoder:(NSCoder *)aCoder;26@end27 28@interface NSObject <NSObject> {}29@end30 31typedef struct {} NSFastEnumerationState;32 33@protocol NSFastEnumeration 34- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len;35@end36 37@interface NSArray : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration>38- (NSUInteger)count;39@end40 41@interface NSMutableArray : NSArray42- (void)addObject:(id)anObject;43+ (id)arrayWithCapacity:(int)numItems;44@end45 46@interface NSBundle : NSObject {}47+ (NSBundle *)bundleForClass:(Class)aClass;48- (NSString *)bundlePath;49- (void)setBundlePath:(NSString *)x;50@end51 52@interface NSException : NSObject <NSCopying, NSCoding> {}53@end54 55@class NSArray, NSDictionary, NSError, NSString, NSURL;56 57@interface DTPlugInManager : NSObject58@end59 60@implementation DTPlugInManager61+ (DTPlugInManager *)defaultPlugInManager {62 @try {63 NSMutableArray *plugInPaths = [NSMutableArray arrayWithCapacity:100];64 NSBundle *frameworkBundle = [NSBundle bundleForClass:[DTPlugInManager class]];65 frameworkBundle.bundlePath = 0;66 [plugInPaths addObject:frameworkBundle.bundlePath];67 }68 @catch (NSException *exception) {}69}70@end71