From e9b801f7633b11b18d357a71442bd003435784e8 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 22 Feb 2011 01:52:06 +0000 Subject: [PATCH] Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on. Update all tests accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126177 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/CC1Options.td | 2 +- lib/Driver/Tools.cpp | 8 ++++---- lib/Frontend/CompilerInvocation.cpp | 4 ++-- test/CodeGenObjC/blocks-4.m | 2 +- test/CodeGenObjC/exceptions-nonfragile.m | 2 +- test/CodeGenObjC/exceptions.m | 2 +- test/CodeGenObjC/gnu-exceptions.m | 2 +- test/CodeGenObjC/metadata_symbols.m | 6 +++--- test/CodeGenObjC/nested-rethrow.m | 2 +- .../CodeGenObjC/rdr-6732143-dangling-block-reference.m | 2 +- test/CodeGenObjC/try.m | 4 ++-- test/CodeGenObjC/unwind-fn.m | 4 ++-- test/Coverage/ast-printing.m | 6 +++--- test/Coverage/codegen-gnu.m | 2 +- test/Coverage/codegen-next.m | 4 ++-- test/Driver/rewrite-objc.m | 2 +- test/PCH/objc_stmts.m | 10 +++++----- test/Parser/objc-try-catch-1.m | 4 ++-- test/Rewriter/finally.m | 2 +- test/Rewriter/rewrite-eh.m | 2 +- test/Rewriter/rewrite-try-catch.m | 2 +- test/SemaObjC/catch-stmt.m | 2 +- test/SemaObjC/invalid-code.m | 2 +- test/SemaObjC/no-objc-exceptions.m | 2 +- test/SemaObjC/property-6.m | 2 +- test/SemaObjC/rdar6248119.m | 2 +- test/SemaObjC/return.m | 2 +- test/SemaObjC/scope-check.m | 2 +- test/SemaObjC/stmts.m | 2 +- test/SemaObjC/try-catch.m | 2 +- test/SemaObjC/warn-unused-exception-param.m | 2 +- test/SemaObjCXX/instantiate-stmt.mm | 2 +- 32 files changed, 48 insertions(+), 48 deletions(-) diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 17fd41a406..8d56a4230e 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -420,7 +420,7 @@ def fexceptions : Flag<"-fexceptions">, HelpText<"Enable support for exception handling">; def fsjlj_exceptions : Flag<"-fsjlj-exceptions">, HelpText<"Use SjLj style exceptions">; -def fno_objc_exceptions : Flag<"-fno-objc-exceptions">, +def fobjc_exceptions : Flag<"-fobjc-exceptions">, HelpText<"Disable Objective-C exceptions">; def ffreestanding : Flag<"-ffreestanding">, HelpText<"Assert that the compilation takes place in a freestanding environment">; diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 2f264e5387..9f4a0bc162 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1546,10 +1546,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fobjc-default-synthesize-properties"); } - // -fobjc-exceptions is default. - if (!Args.hasFlag(options::OPT_fobjc_exceptions, - options::OPT_fno_objc_exceptions)) - CmdArgs.push_back("-fno-objc-exceptions"); + // -fno-objc-exceptions is default. + if (IsRewriter || Args.hasFlag(options::OPT_fobjc_exceptions, + options::OPT_fno_objc_exceptions)) + CmdArgs.push_back("-fobjc-exceptions"); } if (!Args.hasFlag(options::OPT_fassume_sane_operator_new, diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 915634b1dd..d510b5bc52 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1460,7 +1460,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, if (Args.hasArg(OPT_fno_threadsafe_statics)) Opts.ThreadsafeStatics = 0; Opts.Exceptions = Args.hasArg(OPT_fexceptions); - Opts.ObjCExceptions = !Args.hasArg(OPT_fno_objc_exceptions); + Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions); Opts.RTTI = !Args.hasArg(OPT_fno_rtti); Opts.Blocks = Args.hasArg(OPT_fblocks); Opts.CharIsSigned = !Args.hasArg(OPT_fno_signed_char); @@ -1490,7 +1490,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.EmitAllDecls = Args.hasArg(OPT_femit_all_decls); Opts.PICLevel = Args.getLastArgIntValue(OPT_pic_level, 0, Diags); Opts.SjLjExceptions = Args.hasArg(OPT_fsjlj_exceptions); - Opts.ObjCExceptions = !Args.hasArg(OPT_fno_objc_exceptions); + Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions); Opts.Static = Args.hasArg(OPT_static_define); Opts.DumpRecordLayouts = Args.hasArg(OPT_fdump_record_layouts); Opts.DumpVTableLayouts = Args.hasArg(OPT_fdump_vtable_layouts); diff --git a/test/CodeGenObjC/blocks-4.m b/test/CodeGenObjC/blocks-4.m index d945ed44fa..f2d6e21a1c 100644 --- a/test/CodeGenObjC/blocks-4.m +++ b/test/CodeGenObjC/blocks-4.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -fblocks -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -fobjc-exceptions -fblocks -o %t %s // rdar://7590273 void EXIT(id e); diff --git a/test/CodeGenObjC/exceptions-nonfragile.m b/test/CodeGenObjC/exceptions-nonfragile.m index 57ed1d9da9..280b5d416f 100644 --- a/test/CodeGenObjC/exceptions-nonfragile.m +++ b/test/CodeGenObjC/exceptions-nonfragile.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-nonfragile-abi -fexceptions -O2 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-nonfragile-abi -fexceptions -fobjc-exceptions -O2 -o - %s | FileCheck %s // rdar://problem/8535238 // CHECK: declare void @objc_exception_rethrow() diff --git a/test/CodeGenObjC/exceptions.m b/test/CodeGenObjC/exceptions.m index 31805cb8df..d378f848f8 100644 --- a/test/CodeGenObjC/exceptions.m +++ b/test/CodeGenObjC/exceptions.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -O2 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -fobjc-exceptions -O2 -o - %s | FileCheck %s // // [irgen] [eh] Exception code built with clang (x86_64) crashes diff --git a/test/CodeGenObjC/gnu-exceptions.m b/test/CodeGenObjC/gnu-exceptions.m index 6790a29937..7f3ae9df46 100644 --- a/test/CodeGenObjC/gnu-exceptions.m +++ b/test/CodeGenObjC/gnu-exceptions.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fexceptions -fgnu-runtime -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fexceptions -fobjc-exceptions -fgnu-runtime -o - %s | FileCheck %s void opaque(void); void log(int i); diff --git a/test/CodeGenObjC/metadata_symbols.m b/test/CodeGenObjC/metadata_symbols.m index 31639466e8..d86422999f 100644 --- a/test/CodeGenObjC/metadata_symbols.m +++ b/test/CodeGenObjC/metadata_symbols.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -fexceptions -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -fexceptions -fobjc-exceptions -o %t %s // RUN: FileCheck -check-prefix=CHECK-X86_64 < %t %s // RUN: grep '@"OBJC_EHTYPE_$_EH3"' %t | count 3 @@ -12,7 +12,7 @@ // CHECK-X86_64: define internal void @"\01-[A im0]" // CHECK-X86_64: define internal void @"\01-[A(Cat) im1]" -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fvisibility hidden -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-exceptions -fvisibility hidden -emit-llvm -o %t %s // RUN: FileCheck -check-prefix=CHECK-X86_64-HIDDEN < %t %s // CHECK-X86_64-HIDDEN: @"OBJC_CLASS_$_A" = hidden global {{.*}}, section "__DATA, __objc_data", align 8 @@ -23,7 +23,7 @@ // CHECK-X86_64-HIDDEN: define internal void @"\01-[A im0]" // CHECK-X86_64-HIDDEN: define internal void @"\01-[A(Cat) im1]" -// RUN: %clang_cc1 -triple armv6-apple-darwin10 -target-abi apcs-gnu -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple armv6-apple-darwin10 -target-abi apcs-gnu -fobjc-nonfragile-abi -fobjc-exceptions -emit-llvm -o %t %s // RUN: FileCheck -check-prefix=CHECK-ARMV6 < %t %s // CHECK-ARMV6: @"OBJC_CLASS_$_A" = global {{.*}}, section "__DATA, __objc_data", align 4 diff --git a/test/CodeGenObjC/nested-rethrow.m b/test/CodeGenObjC/nested-rethrow.m index 627b913ab0..af5154a24c 100644 --- a/test/CodeGenObjC/nested-rethrow.m +++ b/test/CodeGenObjC/nested-rethrow.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -fobjc-exceptions %s -o - | FileCheck %s extern int printf(const char*, ...); diff --git a/test/CodeGenObjC/rdr-6732143-dangling-block-reference.m b/test/CodeGenObjC/rdr-6732143-dangling-block-reference.m index b4d21a3f8f..fd812dd388 100644 --- a/test/CodeGenObjC/rdr-6732143-dangling-block-reference.m +++ b/test/CodeGenObjC/rdr-6732143-dangling-block-reference.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm %s -o - +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -fobjc-exceptions %s -o - void f0(id x) { @synchronized (x) { diff --git a/test/CodeGenObjC/try.m b/test/CodeGenObjC/try.m index 884e33a219..ba79d62634 100644 --- a/test/CodeGenObjC/try.m +++ b/test/CodeGenObjC/try.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -S -o - -triple=i686-apple-darwin9 -// RUN: %clang_cc1 %s -S -o - -triple=x86_64-apple-darwin9 +// RUN: %clang_cc1 %s -fobjc-exceptions -S -o - -triple=i686-apple-darwin9 +// RUN: %clang_cc1 %s -fobjc-exceptions -S -o - -triple=x86_64-apple-darwin9 // rdar://6757213 - Don't crash if the internal proto for // __objc_personality_v0 mismatches with an actual one. diff --git a/test/CodeGenObjC/unwind-fn.m b/test/CodeGenObjC/unwind-fn.m index 5bfc7dce31..5e4a7a5863 100644 --- a/test/CodeGenObjC/unwind-fn.m +++ b/test/CodeGenObjC/unwind-fn.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -fexceptions -o - %s | FileCheck --check-prefix=DEFAULT_EH %s -// RUN: %clang_cc1 -fsjlj-exceptions -fobjc-nonfragile-abi -fexceptions -emit-llvm -o - %s | FileCheck --check-prefix=SJLJ_EH %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -fexceptions -fobjc-exceptions -o - %s | FileCheck --check-prefix=DEFAULT_EH %s +// RUN: %clang_cc1 -fsjlj-exceptions -fobjc-nonfragile-abi -fexceptions -fobjc-exceptions -emit-llvm -o - %s | FileCheck --check-prefix=SJLJ_EH %s // DEFAULT_EH: declare void @_Unwind_Resume_or_Rethrow(i8*) // SJLJ_EH: declare void @_Unwind_SjLj_Resume_or_Rethrow(i8*) diff --git a/test/Coverage/ast-printing.m b/test/Coverage/ast-printing.m index d9c97d43d4..81c3a6b0ba 100644 --- a/test/Coverage/ast-printing.m +++ b/test/Coverage/ast-printing.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only %s -// RUN: %clang_cc1 -ast-print %s -// RUN: %clang_cc1 -ast-dump %s +// RUN: %clang_cc1 -fsyntax-only -fobjc-exceptions %s +// RUN: %clang_cc1 -ast-print -fobjc-exceptions %s +// RUN: %clang_cc1 -ast-dump -fobjc-exceptions %s #include "objc-language-features.inc" diff --git a/test/Coverage/codegen-gnu.m b/test/Coverage/codegen-gnu.m index 6e7790dc5a..432637c7e1 100644 --- a/test/Coverage/codegen-gnu.m +++ b/test/Coverage/codegen-gnu.m @@ -1,3 +1,3 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown -fgnu-runtime -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -fobjc-exceptions -fgnu-runtime -emit-llvm -o %t %s #include "objc-language-features.inc" diff --git a/test/Coverage/codegen-next.m b/test/Coverage/codegen-next.m index 978b443f0f..8f6645df51 100644 --- a/test/Coverage/codegen-next.m +++ b/test/Coverage/codegen-next.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm -o %t %s -// RUN: %clang_cc1 -g -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -fobjc-exceptions -o %t %s +// RUN: %clang_cc1 -g -emit-llvm -fobjc-exceptions -o %t %s #include "objc-language-features.inc" diff --git a/test/Driver/rewrite-objc.m b/test/Driver/rewrite-objc.m index ac77d79c20..e3d2c0f46d 100644 --- a/test/Driver/rewrite-objc.m +++ b/test/Driver/rewrite-objc.m @@ -3,7 +3,7 @@ // TEST0: clang{{.*}}" "-cc1" // TEST0: "-rewrite-objc" // FIXME: CHECK-NOT is broken somehow, it doesn't work here. Check adjacency instead. -// TEST0: "-fmessage-length" "0" "-fdiagnostics-show-option" +// TEST0: "-fmessage-length" "0" "-fobjc-exceptions" "-fdiagnostics-show-option" // TEST0: rewrite-objc.m" // RUN: not %clang -ccc-no-clang -ccc-host-triple unknown -rewrite-objc %s -o - -### 2>&1 | \ diff --git a/test/PCH/objc_stmts.m b/test/PCH/objc_stmts.m index ed7466a53d..3bc728c35e 100644 --- a/test/PCH/objc_stmts.m +++ b/test/PCH/objc_stmts.m @@ -1,11 +1,11 @@ // Test this without pch. -// RUN: %clang_cc1 -include %S/objc_stmts.h -emit-llvm -o - %s -// RUN: %clang_cc1 -include %S/objc_stmts.h -ast-dump -o - %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -include %S/objc_stmts.h -emit-llvm -fobjc-exceptions -o - %s +// RUN: %clang_cc1 -include %S/objc_stmts.h -ast-dump -fobjc-exceptions -o - %s 2>&1 | FileCheck %s // Test with pch. -// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_stmts.h -// RUN: %clang_cc1 -include-pch %t -emit-llvm -o - %s -// RUN: %clang_cc1 -include-pch %t -ast-dump -o - %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -x objective-c -emit-pch -fobjc-exceptions -o %t %S/objc_stmts.h +// RUN: %clang_cc1 -include-pch %t -emit-llvm -fobjc-exceptions -o - %s +// RUN: %clang_cc1 -include-pch %t -ast-dump -fobjc-exceptions -o - %s 2>&1 | FileCheck %s // CHECK: catch parm = "A *a" // CHECK: catch parm = "B *b" diff --git a/test/Parser/objc-try-catch-1.m b/test/Parser/objc-try-catch-1.m index 719369124e..a3220ebc64 100644 --- a/test/Parser/objc-try-catch-1.m +++ b/test/Parser/objc-try-catch-1.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s -// RUN: %clang_cc1 -fsyntax-only -verify -x objective-c++ %s +// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s +// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions -x objective-c++ %s void * proc(); @interface NSConstantString diff --git a/test/Rewriter/finally.m b/test/Rewriter/finally.m index 7d160cfbdd..ab5d8387cc 100644 --- a/test/Rewriter/finally.m +++ b/test/Rewriter/finally.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -rewrite-objc -verify %s -o - +// RUN: %clang_cc1 -rewrite-objc -fobjc-exceptions -verify %s -o - int main() { @try { diff --git a/test/Rewriter/rewrite-eh.m b/test/Rewriter/rewrite-eh.m index 5bc80b5509..9045f7f766 100644 --- a/test/Rewriter/rewrite-eh.m +++ b/test/Rewriter/rewrite-eh.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -rewrite-objc -o - %s +// RUN: %clang_cc1 -rewrite-objc -fobjc-exceptions -o - %s // rdar://7522880 @interface NSException diff --git a/test/Rewriter/rewrite-try-catch.m b/test/Rewriter/rewrite-try-catch.m index d0c6d2acf6..5e7b3cf904 100644 --- a/test/Rewriter/rewrite-try-catch.m +++ b/test/Rewriter/rewrite-try-catch.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc -fobjc-exceptions %s -o - @interface Foo @end @interface GARF @end diff --git a/test/SemaObjC/catch-stmt.m b/test/SemaObjC/catch-stmt.m index ef1da37709..dcb47640e8 100644 --- a/test/SemaObjC/catch-stmt.m +++ b/test/SemaObjC/catch-stmt.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify -fobjc-exceptions %s @interface A @end @protocol P; diff --git a/test/SemaObjC/invalid-code.m b/test/SemaObjC/invalid-code.m index 7a642fb107..9b7f2c8a97 100644 --- a/test/SemaObjC/invalid-code.m +++ b/test/SemaObjC/invalid-code.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify -fobjc-exceptions // rdar://6124613 void test1() { diff --git a/test/SemaObjC/no-objc-exceptions.m b/test/SemaObjC/no-objc-exceptions.m index 78419a2475..d47f51a84e 100644 --- a/test/SemaObjC/no-objc-exceptions.m +++ b/test/SemaObjC/no-objc-exceptions.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fno-objc-exceptions -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f() { @throw @"Hello"; // expected-error {{cannot use '@throw' with Objective-C exceptions disabled}} diff --git a/test/SemaObjC/property-6.m b/test/SemaObjC/property-6.m index 72beb67b43..933a4f0673 100644 --- a/test/SemaObjC/property-6.m +++ b/test/SemaObjC/property-6.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s # 1 "" # 1 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 1 3 typedef signed char BOOL; diff --git a/test/SemaObjC/rdar6248119.m b/test/SemaObjC/rdar6248119.m index 6b120b2847..046992c52f 100644 --- a/test/SemaObjC/rdar6248119.m +++ b/test/SemaObjC/rdar6248119.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -verify -fobjc-exceptions // Test case for: // @finally doesn't introduce a new scope diff --git a/test/SemaObjC/return.m b/test/SemaObjC/return.m index 116abd19e7..3a626e3696 100644 --- a/test/SemaObjC/return.m +++ b/test/SemaObjC/return.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify -Wmissing-noreturn +// RUN: %clang_cc1 %s -fsyntax-only -verify -Wmissing-noreturn -fobjc-exceptions int test1() { id a; diff --git a/test/SemaObjC/scope-check.m b/test/SemaObjC/scope-check.m index bba321e657..3f474be6e8 100644 --- a/test/SemaObjC/scope-check.m +++ b/test/SemaObjC/scope-check.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s @class A, B, C; diff --git a/test/SemaObjC/stmts.m b/test/SemaObjC/stmts.m index d1e2ad3612..d452db8c8b 100644 --- a/test/SemaObjC/stmts.m +++ b/test/SemaObjC/stmts.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only -fobjc-exceptions struct some_struct; diff --git a/test/SemaObjC/try-catch.m b/test/SemaObjC/try-catch.m index 01fc4f4f2c..da06eca470 100644 --- a/test/SemaObjC/try-catch.m +++ b/test/SemaObjC/try-catch.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s typedef signed char BOOL; typedef struct _NSZone NSZone; diff --git a/test/SemaObjC/warn-unused-exception-param.m b/test/SemaObjC/warn-unused-exception-param.m index f649f8c812..221e16ff64 100644 --- a/test/SemaObjC/warn-unused-exception-param.m +++ b/test/SemaObjC/warn-unused-exception-param.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wunused-exception-parameter %s +// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions -Wunused-exception-parameter %s void f0() { @try {} @catch(id a) {} // expected-warning{{unused exception parameter 'a'}} } diff --git a/test/SemaObjCXX/instantiate-stmt.mm b/test/SemaObjCXX/instantiate-stmt.mm index 5e8ec61573..ff72858afd 100644 --- a/test/SemaObjCXX/instantiate-stmt.mm +++ b/test/SemaObjCXX/instantiate-stmt.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s @interface NSException @end -- 2.40.0