mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove CharStream from SourceLocation.
This commit is contained in:
@@ -41,13 +41,11 @@ optional<CompilerOutput> SolidityCompilationFramework::compileContract()
|
||||
{
|
||||
if (m_compilerInput.debugFailure)
|
||||
{
|
||||
SourceReferenceFormatter formatter(cerr, false, false);
|
||||
|
||||
cerr << "Compiling contract failed" << endl;
|
||||
for (auto const& error: m_compiler.errors())
|
||||
formatter.printExceptionInformation(
|
||||
cerr << SourceReferenceFormatter::formatErrorInformation(
|
||||
*error,
|
||||
formatter.formatErrorInformation(*error)
|
||||
m_compiler
|
||||
);
|
||||
}
|
||||
return {};
|
||||
|
||||
@@ -43,20 +43,6 @@ using namespace solidity::yul;
|
||||
using namespace solidity::yul::test;
|
||||
using namespace solidity::yul::test::yul_fuzzer;
|
||||
|
||||
namespace
|
||||
{
|
||||
void printErrors(ostream& _stream, ErrorList const& _errors)
|
||||
{
|
||||
SourceReferenceFormatter formatter(_stream, false, false);
|
||||
|
||||
for (auto const& error: _errors)
|
||||
formatter.printExceptionInformation(
|
||||
*error,
|
||||
(error->type() == Error::Type::Warning) ? "Warning" : "Error"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
{
|
||||
ProtoConverter converter;
|
||||
@@ -88,7 +74,13 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
!Error::containsOnlyWarnings(stack.errors())
|
||||
)
|
||||
{
|
||||
printErrors(std::cout, stack.errors());
|
||||
SourceReferenceFormatter formatter(std::cout, stack, false, false);
|
||||
|
||||
for (auto const& error: stack.errors())
|
||||
formatter.printExceptionInformation(
|
||||
*error,
|
||||
(error->type() == Error::Type::Warning) ? "Warning" : "Error"
|
||||
);
|
||||
yulAssert(false, "Proto fuzzer generated malformed program");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user