summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/exception-go-boom.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/exception-go-boom.m')
-rw-r--r--clang/test/SemaObjC/exception-go-boom.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/exception-go-boom.m b/clang/test/SemaObjC/exception-go-boom.m
new file mode 100644
index 00000000000..32dc82dba03
--- /dev/null
+++ b/clang/test/SemaObjC/exception-go-boom.m
@@ -0,0 +1,9 @@
+// RUN: clang-cc %s -verify -fsyntax-only
+
+// Note: NSException is not declared.
+void f0(id x) {
+ @try {
+ } @catch (NSException *x) { // expected-warning{{type specifier missing, defaults to 'int'}} expected-error{{@catch parameter is not an Objective-C class type}}
+ }
+}
+
OpenPOWER on IntegriCloud