[SMTChecker] Reset reference variables on assignment to a variable of reference type

This commit is contained in:
Martin Blicha
2021-03-12 19:51:31 +01:00
parent ccd9de137a
commit 6aa6c5f5f9
3 changed files with 27 additions and 0 deletions
+4
View File
@@ -2034,7 +2034,11 @@ void SMTEncoder::assignment(
m_context.newValue(*varDecl);
}
else if (auto varDecl = identifierToVariable(*left))
{
if (varDecl->hasReferenceOrMappingType())
resetReferences(*varDecl);
assignment(*varDecl, _right);
}
else if (
dynamic_cast<IndexAccess const*>(left) ||
dynamic_cast<MemberAccess const*>(left)