diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /include/clang/Analysis/CallGraph.h | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
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); |