]> granicus.if.org Git - clang/commitdiff
add some more coverage.
authorChris Lattner <sabre@nondot.org>
Sun, 12 Apr 2009 23:29:27 +0000 (23:29 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 12 Apr 2009 23:29:27 +0000 (23:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68928 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjC/stmts.m

index 1d096f5e71fd873de67d78319ec31cbba6cc6a18..1d4ea0a771897d8a24fc73f340ca5fa688ed3f30 100644 (file)
@@ -1,9 +1,14 @@
 // RUN: clang-cc %s -verify -fsyntax-only
 
+struct some_struct;
+
 // Note: NSException is not declared.
 void f0(id x) {
   @try {
-  } @catch (NSException *x) { // expected-error{{unknown type name 'NSException'}}
+  } @catch (NSException *x) { // expected-error {{unknown type name 'NSException'}}
+  } @catch (struct some_struct x) { // expected-error {{@catch parameter is not a pointer to an interface type}}
+  } @catch (int x) { // expected-error {{@catch parameter is not a pointer to an interface type}}
+  } @catch (...) {
   }
 }