[cfe-commits] r139988 - in /cfe/trunk: lib/Sema/SemaObjCProperty.cpp test/SemaObjC/property.m

jahanian fjahanian at apple.com
Mon Sep 19 09:34:57 PDT 2011


On Sep 19, 2011, at 7:51 AM, Douglas Gregor wrote:

> 
> On Sep 17, 2011, at 11:48 AM, Fariborz Jahanian wrote:
> 
>> Author: fjahanian
>> Date: Sat Sep 17 13:48:50 2011
>> New Revision: 139988
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=139988&view=rev
>> Log:
>> objc: Don't crash with decl context for property impl.
>> is missing. // rdar//10127639
>> 
>> Modified:
>>   cfe/trunk/lib/Sema/SemaObjCProperty.cpp
>>   cfe/trunk/test/SemaObjC/property.m
>> 
>> Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=139988&r1=139987&r2=139988&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Sat Sep 17 13:48:50 2011
>> @@ -508,7 +508,7 @@
>>                                  IdentifierInfo *PropertyIvar,
>>                                  SourceLocation PropertyIvarLoc) {
>>  ObjCContainerDecl *ClassImpDecl =
>> -    cast_or_null<ObjCContainerDecl>(CurContext);
>> +    dyn_cast_or_null<ObjCContainerDecl>(CurContext);
> 
> FWIW, CurContext can never be NULL. So this could just be a dyn_cast.

Not even in extremely buggy case? Alright then, in r140022.

- Fariborz

> 
> 	- Doug
> 




More information about the cfe-commits mailing list