PATCH: private ivars
Eric Christopher
echristo at gmail.com
Tue Feb 26 10:01:39 PST 2013
On Tue, Feb 26, 2013 at 9:25 AM, Adrian Prantl <aprantl at apple.com> wrote:
> If nobody says anything to the contrary I’m inclined to commit this patch
> later today.
>
Please don't do that btw, if you've asked and I've been reviewing it I'll
get to it as fast as I can, but I get busy too.
That said, while I'm still worried about the caching, I'm not going to hold
it up on those bounds.
Few code issues:
+ if (ID->getImplementation() == 0) {
+ CompletedTypeCache.erase(QualTy.getAsOpaquePtr());
+ }
No braces here.
+ bool Maybe = false;
+ switch (Ty->getTypeClass()) {
+ case Type::ObjCObjectPointer:
+ return
maybeIncompleteInterface(cast<ObjCObjectPointerType>(Ty)->getPointeeType());
+ case Type::ObjCInterface: {
+ ObjCInterfaceDecl* Decl = cast<ObjCInterfaceType>(Ty)->getDecl();
+ if (Decl)
+ Maybe = (Decl->getImplementation() == 0);
+ }
+ default:
+ return Maybe;
+ }
How about replacing Maybe with just return <value>? Also you've got an odd
fallthrough there. Also the * goes on the variable not the type. Also go
ahead and merge the variable inside the conditional and you can then get
rid of the braces as well.
-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130226/c0207447/attachment.html>
More information about the cfe-commits
mailing list