[cfe-commits] r76408 - /cfe/trunk/lib/Index/ASTLocation.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Mon Jul 20 01:28:54 PDT 2009
Author: zhongxingxu
Date: Mon Jul 20 03:28:49 2009
New Revision: 76408
URL: http://llvm.org/viewvc/llvm-project?rev=76408&view=rev
Log:
The children statements might be NULL. Check for this case in
isContainedInStatement().
Modified:
cfe/trunk/lib/Index/ASTLocation.cpp
Modified: cfe/trunk/lib/Index/ASTLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/ASTLocation.cpp?rev=76408&r1=76407&r2=76408&view=diff
==============================================================================
--- cfe/trunk/lib/Index/ASTLocation.cpp (original)
+++ cfe/trunk/lib/Index/ASTLocation.cpp Mon Jul 20 03:28:49 2009
@@ -51,8 +51,9 @@
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;
More information about the cfe-commits
mailing list