blob: dcb47640e844ff01a9cccd8ba7ca1d2aee9c3296 [file] [log] [blame]
Anders Carlssone9b801f2011-02-22 01:52:06 +00001// RUN: %clang_cc1 -verify -fobjc-exceptions %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