Looking good! I still think the end of the function is a better place to warn
-- the dealloc checker hasn't been used since we've gotten the compiler
warning, so I'd rather be consistent with the warning than the old checker.
================
Comment at: lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp:78-86
@@ +77,11 @@
+ IdentifierInfo *ViewControllerII = &Ctx.Idents.get("UIViewController");
+ bool IsViewController = false;
+
+ // Determine if the class subclasses UIViewController.
+ for ( ; ID ; ID = ID->getSuperClass()) {
+ IdentifierInfo *II = ID->getIdentifier();
+
+ if (II == ViewControllerII)
+ IsViewController = true;
+ }
+
----------------
Thinking about this a little more, this should probably be moved into a
separate function with an early return. It's not a big deal but it is
[[http://llvm.org/docs/CodingStandards.html#turn-predicate-loops-into-predicate-functions
| mentioned in our coding standards]].
http://llvm-reviews.chandlerc.com/D78
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits