forked from OSchip/llvm-project
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:
parent
5c958bb528
commit
08e17b506e
|
@ -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">;
|
||||
|
|
|
@ -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}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue