Fix subtle bug in ParentMap::isConsumedExpr(): correctly ignore *parents* that

are ParenExpr or CastExprs.

llvm-svn: 71026
This commit is contained in:
Ted Kremenek 2009-05-05 22:16:12 +00:00
parent c45529b17b
commit 90a6145ad1
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ bool ParentMap::isConsumedExpr(Expr* E) const {
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);
}