]> granicus.if.org Git - clang/commitdiff
Add missing test.
authorEli Friedman <eli.friedman@gmail.com>
Fri, 21 Jun 2013 01:28:03 +0000 (01:28 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Fri, 21 Jun 2013 01:28:03 +0000 (01:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184515 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjCXX/exceptions.mm [new file with mode: 0644]

diff --git a/test/SemaObjCXX/exceptions.mm b/test/SemaObjCXX/exceptions.mm
new file mode 100644 (file)
index 0000000..37e6def
--- /dev/null
@@ -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}}
+    }
+  }
+}