Improve on warning when objc pointer is used in

c++ catch in fragile abi - per Eli's request.

llvm-svn: 133760
This commit is contained in:
Fariborz Jahanian 2011-06-23 21:17:59 +00:00
parent 5c958bb528
commit 08e17b506e
2 changed files with 2 additions and 2 deletions

View File

@ -3154,7 +3154,7 @@ def err_qualified_objc_catch_parm : Error<
def err_objc_pointer_cxx_catch_gnu : Error<
"can't catch Objective C exceptions in C++ in the GNU runtime">;
def warn_objc_pointer_cxx_catch_fragile : Warning<
"catching Objective C exceptions in C++ in the non-unified "
"can not catch an exception thrown with @throw in C++ in the non-unified "
"exception model">, InGroup<ObjCNonUnifiedException>;
def err_objc_object_catch : Error<
"can't catch an Objective C object by value">;

View File

@ -6,7 +6,7 @@ void opaque();
namespace test0 {
void test() {
try {
} catch (NSException *e) { // expected-warning {{catching Objective C exceptions in C++ in the non-unified exception model [-Wobjc-nonunified-exceptions]}}
} catch (NSException *e) { // expected-warning {{can not catch an exception thrown with @throw in C++ in the non-unified exception model}}
}
}
}