[cfe-commits] r65812 - /cfe/trunk/lib/CodeGen/CGBlocks.cpp
Daniel Dunbar
daniel at zuster.org
Sun Mar 1 23:00:57 PST 2009
Author: ddunbar
Date: Mon Mar 2 01:00:57 2009
New Revision: 65812
URL: http://llvm.org/viewvc/llvm-project?rev=65812&view=rev
Log:
Avoid crash when child iterator gives null result.
Modified:
cfe/trunk/lib/CodeGen/CGBlocks.cpp
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=65812&r1=65811&r2=65812&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Mon Mar 2 01:00:57 2009
@@ -111,7 +111,8 @@
CodeGenFunction::BlockInfo &Info) {
for (Stmt::const_child_iterator I = S->child_begin(), E = S->child_end();
I != E; ++I)
- CollectBlockDeclRefInfo(*I, Info);
+ if (*I)
+ CollectBlockDeclRefInfo(*I, Info);
if (const BlockDeclRefExpr *DE = dyn_cast<BlockDeclRefExpr>(S)) {
// FIXME: Handle enums.
More information about the cfe-commits
mailing list