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();