Skip to content

Commit

Permalink
Remove "garbage" code snippet from error message when in import-ast m…
Browse files Browse the repository at this point in the history
…ode.
  • Loading branch information
matheusaaguiar committed Jul 6, 2022
1 parent b2ac0da commit a73bf91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions liblangutil/SourceReferenceFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ void SourceReferenceFormatter::printSourceLocation(SourceReference const& _ref)

string_view text = _ref.text;

if (m_charStreamProvider.charStream(_ref.sourceName).isImportedFromAST())
return;

if (!_ref.multiline)
{
size_t const locationLength = static_cast<size_t>(_ref.endColumn - _ref.startColumn);
Expand Down

0 comments on commit a73bf91

Please sign in to comment.