clang 20.0.0git
Public Member Functions | List of all members
clang::Diagnostic Class Reference

A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine and DiagnosticStorage) that allows clients to enquire about the diagnostic. More...

#include "clang/Basic/Diagnostic.h"

Public Member Functions

 Diagnostic (const DiagnosticsEngine *DO, const DiagnosticBuilder &DiagBuilder)
 
 Diagnostic (const DiagnosticsEngine *DO, SourceLocation DiagLoc, unsigned DiagID, const DiagnosticStorage &DiagStorage, StringRef StoredDiagMessage)
 
const DiagnosticsEnginegetDiags () const
 
unsigned getID () const
 
const SourceLocationgetLocation () const
 
bool hasSourceManager () const
 
SourceManagergetSourceManager () const
 
unsigned getNumArgs () const
 
DiagnosticsEngine::ArgumentKind getArgKind (unsigned Idx) const
 Return the kind of the specified index.
 
const std::string & getArgStdStr (unsigned Idx) const
 Return the provided argument string specified by Idx.
 
const char * getArgCStr (unsigned Idx) const
 Return the specified C string argument.
 
int64_t getArgSInt (unsigned Idx) const
 Return the specified signed integer argument.
 
uint64_t getArgUInt (unsigned Idx) const
 Return the specified unsigned integer argument.
 
const IdentifierInfogetArgIdentifier (unsigned Idx) const
 Return the specified IdentifierInfo argument.
 
uint64_t getRawArg (unsigned Idx) const
 Return the specified non-string argument in an opaque form.
 
unsigned getNumRanges () const
 Return the number of source ranges associated with this diagnostic.
 
const CharSourceRangegetRange (unsigned Idx) const
 
ArrayRef< CharSourceRange