[PATCH] D23705: [GraphTraits] Make nodes_iterator dereference to NodeType*
Tim Shen via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 19 11:36:13 PDT 2016
timshen added inline comments.
================
Comment at: include/clang/Analysis/CallGraph.h:219
@@ -217,5 +218,3 @@
}
- static clang::CallGraphNode &CGdereference(PairTy P) {
- return *(P.second);
- }
+ static clang::CallGraphNode *CGdereference(PairTy P) { return P.second; }
----------------
dblaikie wrote:
> I don't have enough context - but presumably this name should be changed now that the function doesn't actually dereference? (perhaps this is just get<1, PairTy::first_type, PairTy::second_type> - but could be useful to have a generic utility, something like 'firster' and 'seconder' - I thought there might already be, but couldn't find one. Could generalize it like get<> but just allow the actual tuple/pair type to be passed, rather than having to decompose it)
I'll add a GetNthFunctor or something to STLExtras.h in the next patch, so that we don't need to create a specific one.
https://reviews.llvm.org/D23705
More information about the cfe-commits
mailing list