On Tue, Feb 26, 2013 at 9:25 AM, Adrian Prantl <[email protected]> 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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to