Wraps up a reported diagnostic along with location in source and any arguments.
Constructors, destructors, conversion operators
- Diagnostic() noexcept
- Default constructs a new Diagnostic entry.
- Diagnostic(DiagCode code, SourceLocation location) noexcept
- Constructs a new Diagnostic entry with the given code and location.
Symbol& source, DiagCode code, SourceLocation location) noexcept
- Constructs a new Diagnostic entry with the given symbol, code and location.
- auto isError() const -> bool
- auto addNote(DiagCode code, SourceLocation location) -> Diagnostic&
- Adds a new note to the diagnostic at the given source location.
- auto operator<<(const std::string& arg) -> Diagnostic&
- Adds an argument to the diagnostic.
- DiagCode code
- The specific kind of diagnostic that was issued.
- SourceLocation location
- The location in source of the cause of the diagnostic.
- The symbol in which the diagnostic occurred, or null if not applicable.
Diagnostic:: isError() const
Returns true if this diagnostic's code is intrinsically considered an error, regardless of what severity mapping rules might be in place.