diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-03 11:14:06 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-03 11:14:06 +0000 |
commit | 3ff5b26ddd5857a50db4bfacdd198fb32eaebdac (patch) | |
tree | 7ac10f3933d21d1789c684893c8c43111a452aa0 /lib/Analysis/CFG.cpp | |
parent | 8599e7677e067fd01d3b2ee4c0875747d367fd8e (diff) |
Do not add elidable CXXConstructExpr as block-level expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r-- | lib/Analysis/CFG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 5dcbe98c27..ef67d3b957 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -2392,7 +2392,8 @@ CFGBlock *CFGBuilder::VisitCXXConstructExpr(CXXConstructExpr *C, AddStmtChoice::Kind K = asc.asLValue() ? AddStmtChoice::AlwaysAddAsLValue : AddStmtChoice::AlwaysAdd; autoCreateBlock(); - AppendStmt(Block, C, AddStmtChoice(K)); + if (!C->isElidable()) + AppendStmt(Block, C, AddStmtChoice(K)); return VisitChildren(C); } |