LLVM API Documentation

Public Member Functions
llvm::SMDiagnostic Class Reference

#include <SourceMgr.h>

List of all members.

Public Member Functions

 SMDiagnostic ()
 SMDiagnostic (StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg)
 SMDiagnostic (const SourceMgr &sm, SMLoc L, StringRef FN, int Line, int Col, SourceMgr::DiagKind Kind, StringRef Msg, StringRef LineStr, ArrayRef< std::pair< unsigned, unsigned > > Ranges, ArrayRef< SMFixIt > FixIts=None)
const SourceMgrgetSourceMgr () const
SMLoc getLoc () const
StringRef getFilename () const
int getLineNo () const
int getColumnNo () const
SourceMgr::DiagKind getKind () const
StringRef getMessage () const
StringRef getLineContents () const
ArrayRef< std::pair< unsigned,
unsigned > > 
getRanges () const
void addFixIt (const SMFixIt &Hint)
ArrayRef< SMFixItgetFixIts () const
void print (const char *ProgName, raw_ostream &S, bool ShowColors=true) const

Detailed Description

Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a caret diagnostic.

Definition at line 233 of file SourceMgr.h.


Constructor & Destructor Documentation

Definition at line 245 of file SourceMgr.h.

Definition at line 248 of file SourceMgr.h.

SMDiagnostic::SMDiagnostic ( const SourceMgr sm,
SMLoc  L,
StringRef  FN,
int  Line,
int  Col,
SourceMgr::DiagKind  Kind,
StringRef  Msg,
StringRef  LineStr,
ArrayRef< std::pair< unsigned, unsigned > >  Ranges,
ArrayRef< SMFixIt FixIts = None 
)

Member Function Documentation

void llvm::SMDiagnostic::addFixIt ( const SMFixIt Hint) [inline]

Definition at line 263 of file SourceMgr.h.

Definition at line 261 of file SourceMgr.h.

Definition at line 275 of file SourceMgr.h.

Definition at line 264 of file SourceMgr.h.

Definition at line 266 of file SourceMgr.h.

int llvm::SMDiagnostic::getLineNo ( ) const [inline]

Definition at line 262 of file SourceMgr.h.

Referenced by srcMgrDiagHandler().

SMLoc llvm::SMDiagnostic::getLoc ( ) const [inline]

Definition at line 260 of file SourceMgr.h.

Referenced by llvm::SourceMgr::PrintMessage().

Definition at line 265 of file SourceMgr.h.

ArrayRef<std::pair<unsigned, unsigned> > llvm::SMDiagnostic::getRanges ( ) const [inline]

Definition at line 267 of file SourceMgr.h.

Definition at line 259 of file SourceMgr.h.

void SMDiagnostic::print ( const char *  ProgName,
raw_ostream S,
bool  ShowColors = true 
) const

The documentation for this class was generated from the following files: