Add elidable CXXConstructExpr as block-level expr. It converts an lvalue to a rvalue, which is a useful step during AST evaluation.

llvm-svn: 147918
This commit is contained in:
Zhongxing Xu 2012-01-11 02:39:07 +00:00
parent 20139d3809
commit f0cb43f561
2 changed files with 658 additions and 643 deletions

View File

@ -2768,8 +2768,7 @@ CFGBlock *CFGBuilder::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E,
CFGBlock *CFGBuilder::VisitCXXConstructExpr(CXXConstructExpr *C,
AddStmtChoice asc) {
autoCreateBlock();
if (!C->isElidable() && asc.alwaysAdd(*this, C))
appendStmt(Block, C);
appendStmt(Block, C);
return VisitChildren(C);
}

File diff suppressed because it is too large Load Diff