summaryrefslogtreecommitdiff
path: root/test/Driver/exceptions.m
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-17 23:28:31 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-17 23:28:31 +0000
commitd47ea693706f7b0ffa68e879b73a71609a337786 (patch)
treed5189f0568e1d31663bbbe60c6488163d8500814 /test/Driver/exceptions.m
parent617508fb9e33e756f51246df977251e8c8699267 (diff)
downloadclang-d47ea693706f7b0ffa68e879b73a71609a337786.tar.gz
Driver/Obj-C: Be compatible with GCC behavior in that -fno-exceptions *does not*
disable Obj-C exceptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/exceptions.m')
-rw-r--r--test/Driver/exceptions.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Driver/exceptions.m b/test/Driver/exceptions.m
new file mode 100644
index 0000000000..7d85fe30ae
--- /dev/null
+++ b/test/Driver/exceptions.m
@@ -0,0 +1,19 @@
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 \
+// RUN: -fsyntax-only -fno-exceptions %s
+
+void f1() {
+ @throw @"A";
+}
+
+void f0() {
+ @try {
+ f1();
+ } @catch (id x) {
+ ;
+ }
+}
+
+int main() {
+ f0();
+ return 0;
+}