Ignore unimplemented functions for storage returns.

This commit is contained in:
Daniel Kirchner 2018-11-13 12:12:08 +01:00
parent 4eaed37b96
commit b5e9d849ef
4 changed files with 14 additions and 2 deletions

View File

@ -111,6 +111,7 @@ Bugfixes:
* Code Generator: Properly handle negative number literals in ABIEncoderV2.
* Code Generator: Do not crash on using a length of zero for multidimensional fixed-size arrays.
* Commandline Interface: Correctly handle paths with backslashes on windows.
* Control Flow Analyzer: Ignore unimplemented functions when detecting uninitialized storage pointer returns.
* Fix NatSpec json output for `@notice` and `@dev` tags on contract definitions.
* Optimizer: Correctly estimate gas costs of constants for special cases.
* Optimizer: Fix simplification rule initialization bug that appeared on some emscripten platforms.

View File

@ -28,8 +28,11 @@ bool ControlFlowAnalyzer::analyze(ASTNode const& _astRoot)
bool ControlFlowAnalyzer::visit(FunctionDefinition const& _function)
{
auto const& functionFlow = m_cfg.functionFlow(_function);
checkUnassignedStorageReturnValues(_function, functionFlow.entry, functionFlow.exit);
if (_function.isImplemented())
{
auto const& functionFlow = m_cfg.functionFlow(_function);
checkUnassignedStorageReturnValues(_function, functionFlow.entry, functionFlow.exit);
}
return false;
}

View File

@ -0,0 +1,4 @@
contract C {
function f() internal returns(uint[] storage);
function g() internal returns(uint[] storage s);
}

View File

@ -0,0 +1,4 @@
library L {
function f() public returns(uint[] storage);
function g() public returns(uint[] storage s);
}