[cfe-commits] r129499 - /cfe/trunk/lib/Analysis/CFG.cpp
Ted Kremenek
kremenek at apple.com
Wed Apr 13 18:50:50 PDT 2011
Author: kremenek
Date: Wed Apr 13 20:50:50 2011
New Revision: 129499
URL: http://llvm.org/viewvc/llvm-project?rev=129499&view=rev
Log:
Return the correct lastly populated block from CFGBuilder::VisitUnaryExprOrTypeTraitExpr().
Modified:
cfe/trunk/lib/Analysis/CFG.cpp
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=129499&r1=129498&r2=129499&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Wed Apr 13 20:50:50 2011
@@ -2173,13 +2173,15 @@
}
// VLA types have expressions that must be evaluated.
+ CFGBlock *lastBlock = Block;
+
if (E->isArgumentType()) {
for (const VariableArrayType *VA =FindVA(E->getArgumentType().getTypePtr());
VA != 0; VA = FindVA(VA->getElementType().getTypePtr()))
- addStmt(VA->getSizeExpr());
+ lastBlock = addStmt(VA->getSizeExpr());
}
- return Block;
+ return lastBlock;
}
/// VisitStmtExpr - Utility method to handle (nested) statement
More information about the cfe-commits
mailing list