From 24ae89a5a25f8971c7436bb3b7663e66ed99b987 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 9 Apr 2009 05:34:31 +0000 Subject: [PATCH] Another ParentMap bug: only the right side of a comma expression is consumed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68680 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ParentMap.cpp | 4 ++-- 1 file 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(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(P)->getCond(); -- 2.40.0