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];
69 @class NSDictionary, NSException;
70 @class NSMutableDictionary;
73 + (id)stringWithFormat:(NSString *)format, ... ;
76 @interface NSException
77 + (NSException *)exceptionWithName:(NSString *)name reason:(NSString *)reason userInfo:(NSDictionary *)userInfo;
79 id *_imp__NSInvalidArgumentException;
81 @interface NSSetExpression @end
83 @implementation NSSetExpression
84 -(id)expressionValueWithObject:(id)object context:(NSMutableDictionary*)bindings {
87 @throw [NSException exceptionWithName: *_imp__NSInvalidArgumentException reason: [NSString stringWithFormat: @"Can't evaluate set expression; left subexpression not a set (lhs = %@ rhs = %@)", leftSet, rightSet] userInfo: 0];