Merge pull request #11993 from ethereum/remove-trailing-whitespace-after-location-with-no-snippet

Don't include whitespace after `@src` tag if there's no snippet
This commit is contained in:
chriseth 2021-09-20 14:10:59 +02:00 committed by GitHub
commit 2c3322cbf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -293,7 +293,7 @@ string AsmPrinter::formatSourceLocation(
":" + ":" +
to_string(_location.end); to_string(_location.end);
return joinHumanReadable(vector<string>{sourceLocation, solidityCodeSnippet}, " "); return sourceLocation + (solidityCodeSnippet.empty() ? "" : " ") + solidityCodeSnippet;
} }
string AsmPrinter::formatDebugData(shared_ptr<DebugData const> const& _debugData, bool _statement) string AsmPrinter::formatDebugData(shared_ptr<DebugData const> const& _debugData, bool _statement)