diff options
author | Zhongxing Xu <xuzhongxing@foxmail.com> | 2011-12-28 04:38:46 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@foxmail.com> | 2011-12-28 04:38:46 +0000 |
commit | 72b20ff76a9070c1a481331e857aa825ae37c97f (patch) | |
tree | efb2fe6e05a09044a8f195a138cffbd988c0f8a9 /lib/Analysis/CFG.cpp | |
parent | 375bb1413c041055262c8a416f20d10474a5eda9 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r-- | lib/Analysis/CFG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 5bbccf53c5..df8d7011af 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -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); |