[cfe-commits] r118165 - /cfe/trunk/lib/Analysis/CFG.cpp

Zhongxing Xu xuzhongxing at gmail.com
Wed Nov 3 04:14:06 PDT 2010


Author: zhongxingxu
Date: Wed Nov  3 06:14:06 2010
New Revision: 118165

URL: http://llvm.org/viewvc/llvm-project?rev=118165&view=rev
Log:
Do not add elidable CXXConstructExpr as block-level expr.

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=118165&r1=118164&r2=118165&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Wed Nov  3 06:14:06 2010
@@ -2392,7 +2392,8 @@
   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);
 }
 





More information about the cfe-commits mailing list