diff options
Diffstat (limited to 'include/clang/Analysis/CallGraph.h')
-rw-r--r-- | include/clang/Analysis/CallGraph.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/clang/Analysis/CallGraph.h b/include/clang/Analysis/CallGraph.h index 9b68073..509de7b 100644 --- a/include/clang/Analysis/CallGraph.h +++ b/include/clang/Analysis/CallGraph.h @@ -26,7 +26,7 @@ namespace clang { class CallGraphNode; -/// \class The AST-based call graph. +/// \brief The AST-based call graph. /// /// The call graph extends itself with the given declarations by implementing /// the recursive AST visitor, which constructs the graph by visiting the given @@ -102,7 +102,8 @@ public: void dump() const; void viewGraph() const; - /// Part of recursive declaration visitation. + /// Part of recursive declaration visitation. We recursively visit all the + /// Declarations to collect the root functions. bool VisitFunctionDecl(FunctionDecl *FD) { // We skip function template definitions, as their semantics is // only determined when they are instantiated. @@ -121,6 +122,11 @@ public: return true; } + // We are only collecting the declarations, so do not step into the bodies. + bool TraverseStmt(Stmt *S) { return true; } + + bool shouldWalkTypesOfTypeLocs() const { return false; } + private: /// \brief Add the given declaration to the call graph. void addNodeForDecl(Decl *D, bool IsGlobal); |