From babfb448782e7d98e4f1921b81f654a90cf4eeb8 Mon Sep 17 00:00:00 2001 From: wechman Date: Thu, 17 Feb 2022 15:43:19 +0100 Subject: [PATCH] Non-fatal errors are no longer ignored in ASTJSON parse-only cases --- test/libsolidity/ASTJSONTest.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/test/libsolidity/ASTJSONTest.cpp b/test/libsolidity/ASTJSONTest.cpp index 82c6e7e18664..24dc44faee46 100644 --- a/test/libsolidity/ASTJSONTest.cpp +++ b/test/libsolidity/ASTJSONTest.cpp @@ -33,6 +33,7 @@ #include #include #include +#include using namespace solidity::langutil; using namespace solidity::frontend; @@ -138,17 +139,7 @@ TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefi c.reset(); c.setSources(sources); c.setEVMVersion(solidity::test::CommonOptions::get().evmVersion()); - - if (!c.parseAndAnalyze(variant.stopAfter)) - { - // Ignore non-fatal analysis errors, we only want to export. - if (c.state() > CompilerStack::State::Parsed) - continue; - - SourceReferenceFormatter formatter(_stream, c, _formatted, false); - formatter.printErrorInformation(c.errors()); - return TestResult::FatalError; - } + c.parseAndAnalyze(variant.stopAfter); resultsMatch = resultsMatch && runTest( variant,