diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-04-09 05:34:31 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-04-09 05:34:31 +0000 |
| commit | 042befd6d6980d6a7a5248ace6dbea99212d4ca5 (patch) | |
| tree | 1b978f70a945a72d2f2c0cf54de1299ba7ea04f7 /clang/lib | |
| parent | c3f7c851297e56f6d21a4593dec5ec4c51d10423 (diff) | |
| download | bcm5719-llvm-042befd6d6980d6a7a5248ace6dbea99212d4ca5.tar.gz bcm5719-llvm-042befd6d6980d6a7a5248ace6dbea99212d4ca5.zip | |
Another ParentMap bug: only the right side of a comma expression is consumed.
llvm-svn: 68680
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/ParentMap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ParentMap.cpp b/clang/lib/AST/ParentMap.cpp index 33731c63ed8..a27b0fd270c 100644 --- a/clang/lib/AST/ParentMap.cpp +++ b/clang/lib/AST/ParentMap.cpp @@ -66,9 +66,9 @@ bool ParentMap::isConsumedExpr(Expr* E) const { return true; case Stmt::BinaryOperatorClass: { BinaryOperator *BE = cast<BinaryOperator>(P); - // If it is a comma, only the left side is consumed. + // If it is a comma, only the right side is consumed. // If it isn't a comma, both sides are consumed. - return BE->getOpcode()!=BinaryOperator::Comma || DirectChild==BE->getLHS(); + return BE->getOpcode()!=BinaryOperator::Comma ||DirectChild==BE->getRHS(); } case Stmt::ForStmtClass: return DirectChild == cast<ForStmt>(P)->getCond(); |

