Return an SMDiagnostic at the specified location with the specified string.

Synopsis

Declared in <llvm/Support/SourceMgr.h>

SMDiagnostic
GetMessage(
    SMLoc Loc,
    DiagKind Kind,
    Twine const& Msg,
    ArrayRef<SMRange> Ranges = {},
    ArrayRef<SMFixIt> FixIts = {}) const;

Return Value

An SMDiagnostic describing the message at Loc.

Parameters

Name

Description

Loc

Source location associated with the message.

Kind

Severity of the diagnostic.

Msg

If non‐null, the kind of message (e.g., "error") which is prefixed to the message.

Ranges

Optional underline ranges for the caret display.

FixIts

Optional fix‐it hints to attach.

Created with MrDocs