Rename to invalidInPureFunctions

This commit is contained in:
chriseth 2017-09-13 17:18:22 +02:00
parent b756274357
commit 66c01301fe
3 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ bool SemanticInformation::invalidatesStorage(Instruction _instruction)
}
}
bool SemanticInformation::readsFromState(Instruction _instruction)
bool SemanticInformation::invalidInPureFunctions(Instruction _instruction)
{
switch (_instruction)
{

View File

@ -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);
};

View File

@ -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&) {}