From: Ted Kremenek Date: Tue, 5 May 2009 22:16:12 +0000 (+0000) Subject: Fix subtle bug in ParentMap::isConsumedExpr(): correctly ignore *parents* that X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ade9ecaba935489840fa74aaf5b4c640d6589e33;p=clang Fix subtle bug in ParentMap::isConsumedExpr(): correctly ignore *parents* that are ParenExpr or CastExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71026 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp index a27b0fd270..939e6f9be5 100644 --- a/lib/AST/ParentMap.cpp +++ b/lib/AST/ParentMap.cpp @@ -51,7 +51,7 @@ bool ParentMap::isConsumedExpr(Expr* E) const { Stmt *DirectChild = E; // Ignore parents that are parentheses or casts. - while (P && (isa(E) || isa(E))) { + while (P && (isa(P) || isa(P))) { DirectChild = P; P = getParent(P); }