On Jun 23, 2011, at 12:24 PM, Eli Friedman wrote:

> On Thu, Jun 23, 2011 at 12:00 PM, Fariborz Jahanian <[email protected]> 
> wrote:
>> Author: fjahanian
>> Date: Thu Jun 23 14:00:08 2011
>> New Revision: 133747
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=133747&view=rev
>> Log:
>> Support for catching objc pointer objects in c++ catch-statement
>> in fragile abi mode and some other cleanups. // rdar://8940528
>> 
>> 
>> Modified:
>>    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
>>    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>>    cfe/trunk/lib/CodeGen/CGException.cpp
>>    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
>>    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
>>    cfe/trunk/lib/CodeGen/CGObjCRuntime.h
>>    cfe/trunk/lib/Sema/SemaDeclCXX.cpp
>>    cfe/trunk/test/CodeGenObjCXX/catch-id-type.mm
>>    cfe/trunk/test/SemaObjCXX/exceptions-fragile.mm
>> 
>> Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=133747&r1=133746&r2=133747&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
>> +++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Jun 23 14:00:08 
>> 2011
>> @@ -296,3 +296,6 @@
>> 
>>  // A warning group for warnings about Microsoft extensions.
>>  def Microsoft : DiagGroup<"microsoft">;
>> +
>> +def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
>> +
>> 
>> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=133747&r1=133746&r2=133747&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
>> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Jun 23 14:00:08 
>> 2011
>> @@ -3154,11 +3154,8 @@
>>  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 id's exceptions in C++ in the non-unified "
>> -  "exception model">;
>> -def err_objc_pointer_cxx_catch_fragile : Error<
>> -"can't catch Objective C exceptions in C++ in the non-unified "
>> -"exception model">;
>> +  "catching Objective C exceptions 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">;
>>  def err_incomplete_type_objc_at_encode : Error<
> 
> Could the warning be a bit more straightforward, like "this catch
> won't catch ObjC exceptions"?

FWIW, the exact condition is that it won't catch an exception thrown with 
@throw.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to