[cfe-commits] r147306 - /cfe/trunk/lib/Analysis/CFG.cpp
Ted Kremenek
kremenek at apple.com
Wed Dec 28 21:59:49 PST 2011
Hi Zhongxing,
I don't understand how this is actually fixing (1) or (2). Can you explain? We're moving to a place where we will likely linearize the entire CFG (this is already the case for the static analyzer), so it would be great to find a solution to (1) or (2) that doesn't depend on whether or not CXXConstructExpr is a block-level expression.
Thanks,
Ted
On Dec 27, 2011, at 8:38 PM, Zhongxing Xu wrote:
> Author: zhongxingxu
> Date: Tue Dec 27 22:38:46 2011
> New Revision: 147306
>
> URL: http://llvm.org/viewvc/llvm-project?rev=147306&view=rev
> Log:
> 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.
>
> Modified:
> cfe/trunk/lib/Analysis/CFG.cpp
>
> Modified: cfe/trunk/lib/Analysis/CFG.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=147306&r1=147305&r2=147306&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Analysis/CFG.cpp (original)
> +++ cfe/trunk/lib/Analysis/CFG.cpp Tue Dec 27 22:38:46 2011
> @@ -2768,7 +2768,7 @@
> CFGBlock *CFGBuilder::VisitCXXConstructExpr(CXXConstructExpr *C,
> AddStmtChoice asc) {
> autoCreateBlock();
> - if (!C->isElidable())
> + if (!C->isElidable() && asc.alwaysAdd(*this, C))
> appendStmt(Block, C);
>
> return VisitChildren(C);
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list