diff --git a/liblangutil/SourceReferenceFormatter.cpp b/liblangutil/SourceReferenceFormatter.cpp index 0edd551b8..a38c5e617 100644 --- a/liblangutil/SourceReferenceFormatter.cpp +++ b/liblangutil/SourceReferenceFormatter.cpp @@ -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(_ref.endColumn - _ref.startColumn);