private_removing: fix bug in expression substitution
This commit is contained in:
@@ -468,10 +468,8 @@ static SgExpression* substituteExpressions(SgExpression* exp,
|
||||
if (exp->variant() == ARRAY_REF)
|
||||
{
|
||||
const auto& refToExp = refToExpMap.find(exp->unparse());
|
||||
if (refToExp == refToExpMap.end())
|
||||
return exp;
|
||||
|
||||
return refToExp->second;
|
||||
if (refToExp != refToExpMap.end())
|
||||
return refToExp->second;
|
||||
}
|
||||
|
||||
exp->setLhs(substituteExpressions(exp->lhs(), refToExpMap));
|
||||
|
||||
Reference in New Issue
Block a user