aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ParentMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/ParentMap.cpp')
-rw-r--r--lib/AST/ParentMap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp
index 33731c63ed..a27b0fd270 100644
--- a/lib/AST/ParentMap.cpp
+++ b/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();