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)
|
if (exp->variant() == ARRAY_REF)
|
||||||
{
|
{
|
||||||
const auto& refToExp = refToExpMap.find(exp->unparse());
|
const auto& refToExp = refToExpMap.find(exp->unparse());
|
||||||
if (refToExp == refToExpMap.end())
|
if (refToExp != refToExpMap.end())
|
||||||
return exp;
|
return refToExp->second;
|
||||||
|
|
||||||
return refToExp->second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exp->setLhs(substituteExpressions(exp->lhs(), refToExpMap));
|
exp->setLhs(substituteExpressions(exp->lhs(), refToExpMap));
|
||||||
|
|||||||
Reference in New Issue
Block a user