From ade9ecaba935489840fa74aaf5b4c640d6589e33 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 5 May 2009 22:16:12 +0000 Subject: [PATCH] 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 --- lib/AST/ParentMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.50.1