[cfe-commits] r144190 - /cfe/trunk/lib/Analysis/LiveVariables.cpp

John McCall rjmccall at apple.com
Wed Nov 9 09:10:36 PST 2011


Author: rjmccall
Date: Wed Nov  9 11:10:36 2011
New Revision: 144190

URL: http://llvm.org/viewvc/llvm-project?rev=144190&view=rev
Log:
We don't add ExprWithCleanups to the CFG, and getSVal looks
through it, so we should look through it for the live-values
analysis as well.


Modified:
    cfe/trunk/lib/Analysis/LiveVariables.cpp

Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/LiveVariables.cpp?rev=144190&r1=144189&r2=144190&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/LiveVariables.cpp (original)
+++ cfe/trunk/lib/Analysis/LiveVariables.cpp Wed Nov  9 11:10:36 2011
@@ -235,6 +235,10 @@
   while (S) {
     if (const Expr *Ex = dyn_cast<Expr>(S))
       S = Ex->IgnoreParens();    
+    if (const ExprWithCleanups *EWC = dyn_cast<ExprWithCleanups>(S)) {
+      S = EWC->getSubExpr();
+      continue;
+    }
     if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) {
       S = OVE->getSourceExpr();
       continue;





More information about the cfe-commits mailing list