diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-05-04 21:58:24 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-05-15 02:23:40 +0800 |
commit | 16e966dea0bdb3293b9958af26d697a1f59205f5 (patch) | |
tree | 1648e2cfe49e8335851696799611efeab44e8d61 /libsolidity/interface/CompilerStack.cpp | |
parent | 995623f0fa37fdaa6be3dd2d95540fc123ce4248 (diff) | |
download | dexon-solidity-16e966dea0bdb3293b9958af26d697a1f59205f5.tar.gz dexon-solidity-16e966dea0bdb3293b9958af26d697a1f59205f5.tar.zst dexon-solidity-16e966dea0bdb3293b9958af26d697a1f59205f5.zip |
Add control flow analyzer and test for uninitialized storage returns.
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 195f806a..47dc30cf 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -29,6 +29,7 @@ #include <libsolidity/ast/AST.h> #include <libsolidity/parsing/Scanner.h> #include <libsolidity/parsing/Parser.h> +#include <libsolidity/analysis/ControlFlowAnalyzer.h> #include <libsolidity/analysis/ControlFlowGraph.h> #include <libsolidity/analysis/GlobalContext.h> #include <libsolidity/analysis/NameAndTypeResolver.h> @@ -229,6 +230,14 @@ bool CompilerStack::analyze() for (Source const* source: m_sourceOrder) if (!cfg.constructFlow(*source->ast)) noErrors = false; + + if (noErrors) + { + ControlFlowAnalyzer controlFlowAnalyzer(cfg, m_errorReporter); + for (Source const* source: m_sourceOrder) + if (!controlFlowAnalyzer.analyze(*source->ast)) + noErrors = false; + } } if (noErrors) |