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 | 86a68d078c08af24ddc58833d8c10c14f79d21ce (patch) | |
| tree | 4ba386c1b66a6424d9aa6a8d3deb5d0fb2f5b357 /clang/lib | |
| parent | a71989c94e63fe153aa3c37823c553282c7738ed (diff) | |
| download | bcm5719-llvm-86a68d078c08af24ddc58833d8c10c14f79d21ce.tar.gz bcm5719-llvm-86a68d078c08af24ddc58833d8c10c14f79d21ce.zip | |
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
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Analysis/CFG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index 5bbccf53c54..df8d7011af0 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/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); |

