blob: ef1da377094cb9e97563174f89182601d57f2d0c [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -verify %s
Douglas Gregor324b54d2010-05-03 18:51:14 +00002@interface A @end
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}}
Douglas Gregor324b54d2010-05-03 18:51:14 +000011 } @catch(A* a) { }
Steve Narofff50cb362009-03-03 20:59:06 +000012}
13