diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-05 22:16:12 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-05 22:16:12 +0000 |
commit | ade9ecaba935489840fa74aaf5b4c640d6589e33 (patch) | |
tree | 3b634896bfe0bef1aa86935ff1d7738987ecc257 /lib/AST/ParentMap.cpp | |
parent | 037fb7f3691966aa66f2b878a149fba57b947355 (diff) |
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
Diffstat (limited to 'lib/AST/ParentMap.cpp')
-rw-r--r-- | lib/AST/ParentMap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<ParenExpr>(E) || isa<CastExpr>(E))) { + while (P && (isa<ParenExpr>(P) || isa<CastExpr>(P))) { DirectChild = P; P = getParent(P); } |