diff options
author | LianaHus <liana@ethdev.com> | 2015-10-01 23:59:01 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-02 18:38:48 +0800 |
commit | 53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c (patch) | |
tree | 5312fb4944f243347de5ce8473ae1908721efa4e /solc | |
parent | 2706846f43b8a274098a8a4564bddeba06059bb6 (diff) | |
download | dexon-solidity-53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c.tar.gz dexon-solidity-53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c.tar.zst dexon-solidity-53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c.zip |
-fixed the warning printing
-style fixes
Diffstat (limited to 'solc')
-rw-r--r-- | solc/CommandLineInterface.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index e3c7620e..be10faa8 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -491,16 +491,15 @@ bool CommandLineInterface::processInput() // TODO: Perhaps we should not compile unless requested bool optimize = m_args.count("optimize") > 0; unsigned runs = m_args["optimize-runs"].as<unsigned>(); - if (!m_compiler->compile(optimize, runs)) - { - for (auto const& error: m_compiler->errors()) - SourceReferenceFormatter::printExceptionInformation( - cerr, - *error, - (dynamic_pointer_cast<Warning const>(error)) ? "Warning" : "Error", *m_compiler - ); + bool successful = m_compiler->compile(optimize, runs); + for (auto const& error: m_compiler->errors()) + SourceReferenceFormatter::printExceptionInformation( + cerr, + *error, + (dynamic_pointer_cast<Warning const>(error)) ? "Warning" : "Error", *m_compiler + ); + if (!successful) return false; - } m_compiler->link(m_libraries); } catch (ParserError const& _exception) |