mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename to invalidInPureFunctions
This commit is contained in:
parent
b756274357
commit
66c01301fe
@ -189,7 +189,7 @@ bool SemanticInformation::invalidatesStorage(Instruction _instruction)
|
||||
}
|
||||
}
|
||||
|
||||
bool SemanticInformation::readsFromState(Instruction _instruction)
|
||||
bool SemanticInformation::invalidInPureFunctions(Instruction _instruction)
|
||||
{
|
||||
switch (_instruction)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ struct SemanticInformation
|
||||
static bool invalidatesMemory(solidity::Instruction _instruction);
|
||||
/// @returns true if the given instruction modifies storage (even indirectly).
|
||||
static bool invalidatesStorage(solidity::Instruction _instruction);
|
||||
static bool readsFromState(solidity::Instruction _instruction);
|
||||
static bool invalidInPureFunctions(solidity::Instruction _instruction);
|
||||
static bool invalidInViewFunctions(solidity::Instruction _instruction);
|
||||
};
|
||||
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
{
|
||||
if (eth::SemanticInformation::invalidInViewFunctions(_instruction.instruction))
|
||||
m_reportMutability(StateMutability::NonPayable, _instruction.location);
|
||||
else if (eth::SemanticInformation::readsFromState(_instruction.instruction))
|
||||
else if (eth::SemanticInformation::invalidInPureFunctions(_instruction.instruction))
|
||||
m_reportMutability(StateMutability::View, _instruction.location);
|
||||
}
|
||||
void operator()(assembly::Literal const&) {}
|
||||
|
Loading…
Reference in New Issue
Block a user