1 // RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2 // RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -fcxx-exceptions -fexceptions -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
4 typedef struct objc_class *Class;
5 typedef struct objc_object {
9 void *sel_registerName(const char *);
19 @catch (...) { SPLATCH(); @throw; }
29 @catch (Foo* localException) {
31 @throw localException;
53 - (id) ThrowThis { return 0; }
59 @catch (Foo* localException) {
61 @throw [self ThrowThis];
64 @throw [throw_val ThrowThis];
70 @class NSDictionary, NSException;
71 @class NSMutableDictionary;
74 + (id)stringWithFormat:(NSString *)format, ... ;
77 @interface NSException
78 + (NSException *)exceptionWithName:(NSString *)name reason:(NSString *)reason userInfo:(NSDictionary *)userInfo;
80 id *_imp__NSInvalidArgumentException;
82 @interface NSSetExpression @end
84 @implementation NSSetExpression
85 -(id)expressionValueWithObject:(id)object context:(NSMutableDictionary*)bindings {
88 @throw [NSException exceptionWithName: *_imp__NSInvalidArgumentException reason: [NSString stringWithFormat: @"Can't evaluate set expression; left subexpression not a set (lhs = %@ rhs = %@)", leftSet, rightSet] userInfo: 0];