[cfe-commits] r71026 - /cfe/trunk/lib/AST/ParentMap.cpp

Ted Kremenek kremenek at apple.com
Tue May 5 15:16:25 PDT 2009


Author: kremenek
Date: Tue May  5 17:16:12 2009
New Revision: 71026

URL: http://llvm.org/viewvc/llvm-project?rev=71026&view=rev
Log:
Fix subtle bug in ParentMap::isConsumedExpr(): correctly ignore *parents* that
are ParenExpr or CastExprs.

Modified:
    cfe/trunk/lib/AST/ParentMap.cpp

Modified: cfe/trunk/lib/AST/ParentMap.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ParentMap.cpp?rev=71026&r1=71025&r2=71026&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ParentMap.cpp (original)
+++ cfe/trunk/lib/AST/ParentMap.cpp Tue May  5 17:16:12 2009
@@ -51,7 +51,7 @@
   Stmt *DirectChild = E;
   
   // Ignore parents that are parentheses or casts.
-  while (P && (isa<ParenExpr>(E) || isa<CastExpr>(E))) {
+  while (P && (isa<ParenExpr>(P) || isa<CastExpr>(P))) {
     DirectChild = P;
     P = getParent(P);
   }





More information about the cfe-commits mailing list