mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5406 from ethereum/uninitializedStorageUnimplemented
Ignore unimplemented functions for detecting uninitialized storage returns.
This commit is contained in:
commit
7e0041cf22
@ -111,6 +111,7 @@ Bugfixes:
|
|||||||
* Code Generator: Properly handle negative number literals in ABIEncoderV2.
|
* 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.
|
* 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.
|
* 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.
|
* Fix NatSpec json output for `@notice` and `@dev` tags on contract definitions.
|
||||||
* Optimizer: Correctly estimate gas costs of constants for special cases.
|
* Optimizer: Correctly estimate gas costs of constants for special cases.
|
||||||
* Optimizer: Fix simplification rule initialization bug that appeared on some emscripten platforms.
|
* Optimizer: Fix simplification rule initialization bug that appeared on some emscripten platforms.
|
||||||
|
@ -28,8 +28,11 @@ bool ControlFlowAnalyzer::analyze(ASTNode const& _astRoot)
|
|||||||
|
|
||||||
bool ControlFlowAnalyzer::visit(FunctionDefinition const& _function)
|
bool ControlFlowAnalyzer::visit(FunctionDefinition const& _function)
|
||||||
{
|
{
|
||||||
|
if (_function.isImplemented())
|
||||||
|
{
|
||||||
auto const& functionFlow = m_cfg.functionFlow(_function);
|
auto const& functionFlow = m_cfg.functionFlow(_function);
|
||||||
checkUnassignedStorageReturnValues(_function, functionFlow.entry, functionFlow.exit);
|
checkUnassignedStorageReturnValues(_function, functionFlow.entry, functionFlow.exit);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
contract C {
|
||||||
|
function f() internal returns(uint[] storage);
|
||||||
|
function g() internal returns(uint[] storage s);
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
library L {
|
||||||
|
function f() public returns(uint[] storage);
|
||||||
|
function g() public returns(uint[] storage s);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user