summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/exceptions.m19
-rw-r--r--clang/test/Driver/exceptions.mm6
-rw-r--r--clang/test/Driver/rewrite-legacy-objc.m4
3 files changed, 21 insertions, 8 deletions
diff --git a/clang/test/Driver/exceptions.m b/clang/test/Driver/exceptions.m
new file mode 100644
index 00000000000..9b747bb84d1
--- /dev/null
+++ b/clang/test/Driver/exceptions.m
@@ -0,0 +1,19 @@
+// RUN: %clang -target 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;
+}
diff --git a/clang/test/Driver/exceptions.mm b/clang/test/Driver/exceptions.mm
deleted file mode 100644
index 1d918cf39bf..00000000000
--- a/clang/test/Driver/exceptions.mm
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %clang -target x86_64-apple-darwin11 -fno-exceptions %s -o - -### 2>&1 | \
-// RUN: FileCheck %s
-
-CHECK-NOT: "-fobjc-exceptions"
-CHECK-NOT: "-fcxx-exceptions"
-CHECK-NOT: "-fexceptions"
diff --git a/clang/test/Driver/rewrite-legacy-objc.m b/clang/test/Driver/rewrite-legacy-objc.m
index ceb654f946d..b0b78d00817 100644
--- a/clang/test/Driver/rewrite-legacy-objc.m
+++ b/clang/test/Driver/rewrite-legacy-objc.m
@@ -9,5 +9,5 @@
// RUN: FileCheck -check-prefix=TEST1 %s
// RUN: %clang -no-canonical-prefixes -target i386-apple-macosx10.6.0 -rewrite-legacy-objc %s -o - -### 2>&1 | \
// RUN: FileCheck -check-prefix=TEST2 %s
-// TEST1: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-fragile" "-fobjc-subscripting-legacy-runtime" "-fencode-extended-block-signature" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fmax-type-align=16" "-fdiagnostics-show-option"
-// TEST2: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-fragile" "-fencode-extended-block-signature" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fmax-type-align=16" "-fdiagnostics-show-option"
+// TEST1: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-fragile" "-fobjc-subscripting-legacy-runtime" "-fencode-extended-block-signature" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fmax-type-align=16" "-fdiagnostics-show-option"
+// TEST2: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-fragile" "-fencode-extended-block-signature" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fmax-type-align=16" "-fdiagnostics-show-option"
OpenPOWER on IntegriCloud