aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/exceptions.m
diff options
context:
space:
mode:
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 000000000000..7d85fe30aefa
--- /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;
+}