block-level expr. Currently CXXConstructExpr is always added as a block-level
expr. This caused two problems for the analyzer (and potentially for the
CFG-based codegen).
1. We have no way to know whether a ctor call is base or complete.
2. We have no way to know the destination object being contructed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147306
91177308-0d34-0410-b5e6-
96231b3b80d8
CFGBlock *CFGBuilder::VisitCXXConstructExpr(CXXConstructExpr *C,
AddStmtChoice asc) {
autoCreateBlock();
- if (!C->isElidable())
+ if (!C->isElidable() && asc.alwaysAdd(*this, C))
appendStmt(Block, C);
return VisitChildren(C);