aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Analysis/CallGraph.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Analysis/CallGraph.h b/include/clang/Analysis/CallGraph.h
index 81afec0827..509de7bc21 100644
--- a/include/clang/Analysis/CallGraph.h
+++ b/include/clang/Analysis/CallGraph.h
@@ -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,9 @@ 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: