forked from OSchip/llvm-project
Fix subtle bug in ParentMap::isConsumedExpr(): correctly ignore *parents* that
are ParenExpr or CastExprs. llvm-svn: 71026
This commit is contained in:
parent
c45529b17b
commit
90a6145ad1
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue