From: Fariborz Jahanian Date: Thu, 23 Jun 2011 21:17:59 +0000 (+0000) Subject: Improve on warning when objc pointer is used in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d028302b57ff14a495eaa220393ae40c14a583f4;p=clang Improve on warning when objc pointer is used in c++ catch in fragile abi - per Eli's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133760 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index fb031596d5..c734c064e7 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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; def err_objc_object_catch : Error< "can't catch an Objective C object by value">; diff --git a/test/SemaObjCXX/exceptions-fragile.mm b/test/SemaObjCXX/exceptions-fragile.mm index ebbf6a0374..71e259aa6b 100644 --- a/test/SemaObjCXX/exceptions-fragile.mm +++ b/test/SemaObjCXX/exceptions-fragile.mm @@ -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}} } } }