[cfe-commits] r44028 - in /cfe/trunk: AST/StmtPrinter.cpp Sema/SemaExpr.cpp include/clang/AST/Expr.h test/Sema/static-ivar-ref-1.m

Fariborz Jahanian fjahanian at apple.com
Thu Dec 13 09:41:58 PST 2007


On Dec 12, 2007, at 8:44 PM, Chris Lattner wrote:
>
> Hi Fariborz,
>
>> +++ cfe/trunk/Sema/SemaExpr.cpp Mon Nov 12 16:29:28 2007
>> @@ -519,9 +519,20 @@
>>    if (ret.isNull())
>>      return true;
>>    return new OCUVectorElementExpr(ret, BaseExpr, Member, MemberLoc);
>> +  } else if (BaseType->isObjcInterfaceType()) {
>> +    ObjcInterfaceDecl *IFace;
>> +    if (isa<ObjcInterfaceType>(BaseType.getCanonicalType()))
>> +      IFace = dyn_cast<ObjcInterfaceType>(BaseType)->getDecl();
>> +    else
>> +      IFace = dyn_cast<ObjcQualifiedInterfaceType>(BaseType)
>> +                ->getInterfaceType()->getDecl();
>
> Code like this could be simplified if ObjcQualifiedInterfaceType  
> inherited from ObjcInterfaceType.  Would it make sense to do this?   
> Then the code above would just be:

It makes sense. I will change it later today.

- Fariborz




More information about the cfe-commits mailing list