Skip to content

Commit a73bf91

Browse files
Remove "garbage" code snippet from error message when in import-ast mode.
1 parent b2ac0da commit a73bf91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

liblangutil/SourceReferenceFormatter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ void SourceReferenceFormatter::printSourceLocation(SourceReference const& _ref)
124124

125125
string_view text = _ref.text;
126126

127+
if (m_charStreamProvider.charStream(_ref.sourceName).isImportedFromAST())
128+
return;
129+
127130
if (!_ref.multiline)
128131
{
129132
size_t const locationLength = static_cast<size_t>(_ref.endColumn - _ref.startColumn);

0 commit comments

Comments
 (0)