2011-02-22 09:52:06 +08:00
|
|
|
// RUN: %clang_cc1 -verify -fobjc-exceptions %s
|
2010-05-04 02:51:14 +08:00
|
|
|
@interface A @end
|
2009-03-04 05:16:54 +08:00
|
|
|
@protocol P;
|
|
|
|
|
2009-03-04 04:59:06 +08:00
|
|
|
void f() {
|
|
|
|
@try {
|
2009-04-12 16:25:48 +08:00
|
|
|
} @catch (void a) { // expected-error{{@catch parameter is not a pointer to an interface type}}
|
|
|
|
} @catch (int) { // expected-error{{@catch parameter is not a pointer to an interface type}}
|
|
|
|
} @catch (int *b) { // expected-error{{@catch parameter is not a pointer to an interface type}}
|
2009-03-04 07:13:51 +08:00
|
|
|
} @catch (id <P> c) { // expected-error{{illegal qualifiers on @catch parameter}}
|
2010-05-04 02:51:14 +08:00
|
|
|
} @catch(A* a) { }
|
2009-03-04 04:59:06 +08:00
|
|
|
}
|
|
|
|
|