summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Index/ASTLocation.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Index/ASTLocation.cpp b/clang/lib/Index/ASTLocation.cpp
index 84d79363ef8..e869707f4d2 100644
--- a/clang/lib/Index/ASTLocation.cpp
+++ b/clang/lib/Index/ASTLocation.cpp
@@ -51,8 +51,9 @@ static bool isContainedInStatement(Stmt *Node, Stmt *Parent) {
for (Stmt::child_iterator
I = Parent->child_begin(), E = Parent->child_end(); I != E; ++I) {
- if (isContainedInStatement(Node, *I))
- return true;
+ if (*I)
+ if (isContainedInStatement(Node, *I))
+ return true;
}
return false;
OpenPOWER on IntegriCloud