[cfe-commits] r170825 - in /cfe/trunk: include/clang/Analysis/CallGraph.h lib/Analysis/CallGraph.cpp lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Anna Zaks
ganna at apple.com
Thu Dec 20 19:03:21 PST 2012
On Dec 20, 2012, at 5:53 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> 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?
>
What do you mean? It's a "may-call" because we are not 100% sure that is what will be called at runtime (We don't do the same checking as in CallEvent to be 100% sure.).
>
>> + 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