aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/exceptions.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/exceptions.mm')
-rw-r--r--test/SemaObjCXX/exceptions.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaObjCXX/exceptions.mm b/test/SemaObjCXX/exceptions.mm
new file mode 100644
index 000000000000..37e6def35b04
--- /dev/null
+++ b/test/SemaObjCXX/exceptions.mm
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin11 -fsyntax-only -verify %s
+
+@interface NSException @end
+
+namespace test0 {
+ void test() {
+ try {
+ } catch (NSException e) { // expected-error {{can't catch an Objective-C object by value}}
+ }
+ }
+}