summaryrefslogtreecommitdiff
path: root/clang-plugin/nullability-checker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-plugin/nullability-checker.cpp')
-rw-r--r--clang-plugin/nullability-checker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-plugin/nullability-checker.cpp b/clang-plugin/nullability-checker.cpp
index e381bb2..2e27def 100644
--- a/clang-plugin/nullability-checker.cpp
+++ b/clang-plugin/nullability-checker.cpp
@@ -75,7 +75,7 @@ NullabilityVisitor::TraverseFunctionDecl (FunctionDecl* func)
/* Can only handle functions which have a body defined. */
Stmt* func_body = func->getBody ();
- if (func_body == NULL)
+ if (func_body == NULL || !func->isThisDeclarationADefinition ())
return true;
/* The body should be a compound statement, e.g.