slang::Diagnostics class

A collection of diagnostics.

Base classes

template<typename T, size_t N = detail::calculateDefaultSmallVectorElems<T>()>
class SmallVector<Diagnostic>
A concrete, sized version of the SmallVectorBase<T> template.

Public functions

Diagnostic& add(DiagCode code, SourceLocation location)
Adds a new diagnostic to the collection, pointing to the given source location.
Diagnostic& add(DiagCode code, SourceRange range)
Adds a new diagnostic to the collection, highlighting the given source range.
Diagnostic& add(const ast::Symbol& source, DiagCode code, SourceLocation location)
Adds a new diagnostic to the collection, pointing to the given source location.
Diagnostic& add(const ast::Symbol& source, DiagCode code, SourceRange range)
Adds a new diagnostic to the collection, highlighting the given source range.
void sort(const SourceManager& sourceManager)
Sorts the diagnostics in the collection based on source file and line number.
Diagnostics filter(std::initializer_list<DiagCode> list) const
Returns a copy of this collection with all diagnostics that match any of the codes given in list filtered out.