diff options
author | chriseth <chris@ethereum.org> | 2017-08-29 01:48:34 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-09-06 19:50:49 +0800 |
commit | 5470da4d9adc8ef07aa1c2a758b7062be843cca4 (patch) | |
tree | 824e0012f236a9d959c0eb46e5a1fdb02ece43ec /libsolidity/interface | |
parent | 16526ad554256bde3e185c99c1651b0f47725165 (diff) | |
download | dexon-solidity-5470da4d9adc8ef07aa1c2a758b7062be843cca4.tar.gz dexon-solidity-5470da4d9adc8ef07aa1c2a758b7062be843cca4.tar.zst dexon-solidity-5470da4d9adc8ef07aa1c2a758b7062be843cca4.zip |
View-pure checker.
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 259694da..99ad061c 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -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> @@ -222,6 +223,16 @@ bool CompilerStack::analyze() 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); for (Source const* source: m_sourceOrder) smtChecker.analyze(*source->ast); |