[cfe-commits] r60035 - in /cfe/trunk: lib/AST/Expr.cpp test/Analysis/ObjCProperties.m test/SemaObjC/property-category-1.m
Chris Lattner
clattner at apple.com
Tue Nov 25 10:37:08 PST 2008
On Nov 25, 2008, at 9:56 AM, Fariborz Jahanian wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=60035&view=rev
> Log:
> Patch to allow over-riding of readonly property to
> a writable property in one of its category.
cool.
> + PTy->getPointeeType()->getAsObjCInterfaceType();
> + ObjCInterfaceDecl *IFace = IFTy->getDecl();
> + for (ObjCCategoryDecl *Category = IFace->getCategoryList();
> + Category; Category = Category->getNextClassCategory()) {
> + PDecl= Category->FindPropertyDeclaration(PDecl-
> >getIdentifier());
> + if (PDecl && !PDecl->isReadOnly())
> + return MLV_Valid;
> + }
Does this loop happen in other places? If so, maybe this should be a
helper method on ObjCInterfaceDecl? There are a lot of "walk the
class hierarchy and look for stuff" loops in the ObjC support, it
would be nice to factor them somehow.
-Chris
More information about the cfe-commits
mailing list