blob: 80c986ff54478285c1b815f29f6fd163a3555da4 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -verify %s
Steve Narofff50cb362009-03-03 20:59:06 +00002
Steve Naroff9d40ee52009-03-03 21:16:54 +00003@protocol P;
4
Steve Narofff50cb362009-03-03 20:59:06 +00005void f() {
6 @try {
Chris Lattner05af2622009-04-12 08:25:48 +00007 } @catch (void a) { // expected-error{{@catch parameter is not a pointer to an interface type}}
8 } @catch (int) { // expected-error{{@catch parameter is not a pointer to an interface type}}
9 } @catch (int *b) { // expected-error{{@catch parameter is not a pointer to an interface type}}
Steve Naroffd198aba2009-03-03 23:13:51 +000010 } @catch (id <P> c) { // expected-error{{illegal qualifiers on @catch parameter}}
Steve Narofff50cb362009-03-03 20:59:06 +000011 }
12}
13