summaryrefslogtreecommitdiff
path: root/test/SemaObjCXX
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-06-21 01:28:03 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-06-21 01:28:03 +0000
commitc6498cdcd9922d98522a71013ddfd2b0809f0ef5 (patch)
treee4c2c733cb00ea48351b88033a7a159e9b299e99 /test/SemaObjCXX
parent076f51fd1f306cafc3b1f1d323d25ac81bf7d4f7 (diff)
downloadclang-c6498cdcd9922d98522a71013ddfd2b0809f0ef5.tar.gz
Add missing test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjCXX')
-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 0000000000..37e6def35b
--- /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}}
+ }
+ }
+}