Rephrase erasure condition in DataFlowAnalyzer.

This commit is contained in:
Daniel Kirchner 2021-01-06 10:39:06 +01:00
parent 3ed55613ba
commit eb035147d2

View File

@ -64,10 +64,9 @@ void DataFlowAnalyzer::operator()(ExpressionStatement& _statement)
{ {
ASTModifier::operator()(_statement); ASTModifier::operator()(_statement);
cxx20::erase_if(m_storage, [&](auto const& entry) { cxx20::erase_if(m_storage, [&](auto const& entry) {
return !( return
m_knowledgeBase.knownToBeDifferent(vars->first, entry.first) || !m_knowledgeBase.knownToBeDifferent(vars->first, entry.first) &&
m_knowledgeBase.knownToBeEqual(vars->second, entry.second) !m_knowledgeBase.knownToBeEqual(vars->second, entry.second);
);
}); });
m_storage[vars->first] = vars->second; m_storage[vars->first] = vars->second;
} }