1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s 2*f4a2713aSLionel Sambuc// expected-no-diagnostics 3*f4a2713aSLionel Sambuc# 1 "<command line>" 4*f4a2713aSLionel Sambuc# 1 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 1 3 5*f4a2713aSLionel Sambuctypedef signed char BOOL; 6*f4a2713aSLionel Sambuctypedef unsigned int NSUInteger; 7*f4a2713aSLionel Sambuctypedef struct _NSZone NSZone; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@protocol NSObject 12*f4a2713aSLionel Sambuc- (BOOL)isEqual:(id)object; 13*f4a2713aSLionel Sambuc+ class; 14*f4a2713aSLionel Sambuc@end 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc@protocol NSCopying 17*f4a2713aSLionel Sambuc- (id)copyWithZone:(NSZone *)zone; 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@protocol NSMutableCopying 21*f4a2713aSLionel Sambuc- (id)mutableCopyWithZone:(NSZone *)zone; 22*f4a2713aSLionel Sambuc@end 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc@protocol NSCoding 25*f4a2713aSLionel Sambuc- (void)encodeWithCoder:(NSCoder *)aCoder; 26*f4a2713aSLionel Sambuc@end 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc@interface NSObject <NSObject> {} 29*f4a2713aSLionel Sambuc@end 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuctypedef struct {} NSFastEnumerationState; 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc@protocol NSFastEnumeration 34*f4a2713aSLionel Sambuc- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len; 35*f4a2713aSLionel Sambuc@end 36*f4a2713aSLionel Sambuc 37*f4a2713aSLionel Sambuc@interface NSArray : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration> 38*f4a2713aSLionel Sambuc- (NSUInteger)count; 39*f4a2713aSLionel Sambuc@end 40*f4a2713aSLionel Sambuc 41*f4a2713aSLionel Sambuc@interface NSMutableArray : NSArray 42*f4a2713aSLionel Sambuc- (void)addObject:(id)anObject; 43*f4a2713aSLionel Sambuc+ (id)arrayWithCapacity:(int)numItems; 44*f4a2713aSLionel Sambuc@end 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuc@interface NSBundle : NSObject {} 47*f4a2713aSLionel Sambuc+ (NSBundle *)bundleForClass:(Class)aClass; 48*f4a2713aSLionel Sambuc- (NSString *)bundlePath; 49*f4a2713aSLionel Sambuc- (void)setBundlePath:(NSString *)x; 50*f4a2713aSLionel Sambuc@end 51*f4a2713aSLionel Sambuc 52*f4a2713aSLionel Sambuc@interface NSException : NSObject <NSCopying, NSCoding> {} 53*f4a2713aSLionel Sambuc@end 54*f4a2713aSLionel Sambuc 55*f4a2713aSLionel Sambuc@class NSArray, NSDictionary, NSError, NSString, NSURL; 56*f4a2713aSLionel Sambuc 57*f4a2713aSLionel Sambuc@interface DTPlugInManager : NSObject 58*f4a2713aSLionel Sambuc@end 59*f4a2713aSLionel Sambuc 60*f4a2713aSLionel Sambuc@implementation DTPlugInManager 61*f4a2713aSLionel Sambuc+ (DTPlugInManager *)defaultPlugInManager { 62*f4a2713aSLionel Sambuc @try { 63*f4a2713aSLionel Sambuc NSMutableArray *plugInPaths = [NSMutableArray arrayWithCapacity:100]; 64*f4a2713aSLionel Sambuc NSBundle *frameworkBundle = [NSBundle bundleForClass:[DTPlugInManager class]]; 65*f4a2713aSLionel Sambuc frameworkBundle.bundlePath = 0; 66*f4a2713aSLionel Sambuc [plugInPaths addObject:frameworkBundle.bundlePath]; 67*f4a2713aSLionel Sambuc } 68*f4a2713aSLionel Sambuc @catch (NSException *exception) {} 69*f4a2713aSLionel Sambuc} 70*f4a2713aSLionel Sambuc@end 71