summaryrefslogtreecommitdiff
path: root/include/clang/Analysis/CallGraph.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Analysis/CallGraph.h')
-rw-r--r--include/clang/Analysis/CallGraph.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/Analysis/CallGraph.h b/include/clang/Analysis/CallGraph.h
index b8ae67cbba494..a2a27a8e47c75 100644
--- a/include/clang/Analysis/CallGraph.h
+++ b/include/clang/Analysis/CallGraph.h
@@ -98,7 +98,7 @@ public:
bool VisitFunctionDecl(FunctionDecl *FD) {
// We skip function template definitions, as their semantics is
// only determined when they are instantiated.
- if (includeInGraph(FD)) {
+ if (includeInGraph(FD) && FD->isThisDeclarationADefinition()) {
// Add all blocks declared inside this function to the graph.
addNodesForBlocks(FD);
// If this function has external linkage, anything could call it.