forked from OSchip/llvm-project
Enable the user to control whether CXXConstructExpr will be added as a
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. llvm-svn: 147306
This commit is contained in:
parent
a71989c94e
commit
86a68d078c
|
@ -2768,7 +2768,7 @@ CFGBlock *CFGBuilder::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E,
|
|||
CFGBlock *CFGBuilder::VisitCXXConstructExpr(CXXConstructExpr *C,
|
||||
AddStmtChoice asc) {
|
||||
autoCreateBlock();
|
||||
if (!C->isElidable())
|
||||
if (!C->isElidable() && asc.alwaysAdd(*this, C))
|
||||
appendStmt(Block, C);
|
||||
|
||||
return VisitChildren(C);
|
||||
|
|
Loading…
Reference in New Issue