mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2848 from ethereum/checkViewPure
Enforce view and pure.
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <libsolidity/analysis/StaticAnalyzer.h>
|
||||
#include <libsolidity/analysis/PostTypeChecker.h>
|
||||
#include <libsolidity/analysis/SyntaxChecker.h>
|
||||
#include <libsolidity/analysis/ViewPureChecker.h>
|
||||
#include <libsolidity/codegen/Compiler.h>
|
||||
#include <libsolidity/formal/SMTChecker.h>
|
||||
#include <libsolidity/interface/ABI.h>
|
||||
@@ -220,6 +221,16 @@ bool CompilerStack::analyze()
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
{
|
||||
vector<ASTPointer<ASTNode>> ast;
|
||||
for (Source const* source: m_sourceOrder)
|
||||
ast.push_back(source->ast);
|
||||
|
||||
if (!ViewPureChecker(ast, m_errorReporter).check())
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
{
|
||||
SMTChecker smtChecker(m_errorReporter, m_smtQuery);
|
||||
|
||||
Reference in New Issue
Block a user