Consider mappings return values in control flow analysis.

This commit is contained in:
Daniel Kirchner
2018-08-13 16:33:37 +02:00
parent a9f31da411
commit 4ae59acc09
6 changed files with 25 additions and 1 deletions
+4 -1
View File
@@ -75,7 +75,10 @@ void ControlFlowAnalyzer::checkUnassignedStorageReturnValues(
{
auto& unassignedAtFunctionEntry = unassigned[_functionEntry];
for (auto const& returnParameter: _function.returnParameterList()->parameters())
if (returnParameter->type()->dataStoredIn(DataLocation::Storage))
if (
returnParameter->type()->dataStoredIn(DataLocation::Storage) ||
returnParameter->type()->category() == Type::Category::Mapping
)
unassignedAtFunctionEntry.insert(returnParameter.get());
}