[cfe-commits] r170825 - in /cfe/trunk: include/clang/Analysis/CallGraph.h lib/Analysis/CallGraph.cpp lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Jordan Rose
jordan_rose at apple.com
Thu Dec 20 17:53:15 PST 2012
Forgot to say: nice work for yet more speedup!
On Dec 20, 2012, at 17:19 , Anna Zaks <ganna at apple.com> wrote:
>
> +STATISTIC(NumObjCCallEdges, "Number of objective C call edges");
Super-nitpicking: s/objective C/Objective-C method/
> + // Adds may-call edges for the ObjC message sends.
Looks like there's nothing special about "may-call" edges anymore?
> + void VisitObjCMessageExpr(ObjCMessageExpr *ME) {
> + if (ObjCInterfaceDecl *IDecl = ME->getReceiverInterface()) {
> + Selector Sel = ME->getSelector();
> +
> + // Fild the callee definition within the same translation unit.
Typo: "Fild"
> void CallGraphNode::print(raw_ostream &os) const {
> - os << getName();
> + if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(FD))
> + return ND->printName(os);
> + os << "< >";
> }
It'd be nice to have a way to tell blocks apart; some parts of our code say "anonymous block at <line>:<col>", but even just a pointer value would be nice.
> - return Node->getName();
> + if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(Node->getDecl()))
> + return ND->getNameAsString();
> + else
> + return "< >";
This duplication is an unfortunate downside of removing getName(). Maybe print to a local buffer?
More information about the cfe-commits
mailing list