mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
SSAValueTracker should only use nullptr for default values
This commit is contained in:
parent
f4e9c70ecc
commit
d0204eef2f
@ -37,7 +37,7 @@ void SSAValueTracker::operator()(VariableDeclaration const& _varDecl)
|
||||
{
|
||||
if (_varDecl.variables.size() == 1)
|
||||
setValue(_varDecl.variables.front().name, _varDecl.value.get());
|
||||
else
|
||||
else if (!_varDecl.value)
|
||||
for (auto const& var: _varDecl.variables)
|
||||
setValue(var.name, nullptr);
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ namespace yul
|
||||
* Class that walks the AST and stores the initial value of each variable
|
||||
* that is never assigned to.
|
||||
*
|
||||
* Default value is represented as nullptr.
|
||||
*
|
||||
* Prerequisite: Disambiguator
|
||||
*/
|
||||
class SSAValueTracker: public ASTWalker
|
||||
|
Loading…
Reference in New Issue
Block a user