clang 19.0.0git
Public Member Functions | Protected Member Functions | List of all members
clang::SARIFDiagnostic Class Reference

#include "clang/Frontend/SARIFDiagnostic.h"

Inheritance diagram for clang::SARIFDiagnostic:
Inheritance graph
[legend]

Public Member Functions

 SARIFDiagnostic (raw_ostream &OS, const LangOptions &LangOpts, DiagnosticOptions *DiagOpts, SarifDocumentWriter *Writer)
 
 ~SARIFDiagnostic ()=default
 
SARIFDiagnosticoperator= (const SARIFDiagnostic &&)=delete
 
 SARIFDiagnostic (SARIFDiagnostic &&)=delete
 
SARIFDiagnosticoperator= (const SARIFDiagnostic &)=delete
 
 SARIFDiagnostic (const SARIFDiagnostic &)=delete
 
- Public Member Functions inherited from clang::DiagnosticRenderer
void emitDiagnostic (FullSourceLoc Loc, DiagnosticsEngine::Level Level, StringRef Message, ArrayRef< CharSourceRange > Ranges, ArrayRef< FixItHint > FixItHints, DiagOrStoredDiag D=(Diagnostic *) nullptr)
 Emit a diagnostic.
 
void emitStoredDiagnostic (StoredDiagnostic &Diag)
 

Protected Member Functions

void emitDiagnosticMessage (FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, StringRef Message, ArrayRef< CharSourceRange > Ranges, DiagOrStoredDiag D) override
 
void emitDiagnosticLoc (FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, ArrayRef< CharSourceRange > Ranges) override
 Print out the file/line/column information and include trace.
 
void emitCodeContext (FullSourceLoc Loc, DiagnosticsEngine::Level Level, SmallVectorImpl< CharSourceRange > &Ranges, ArrayRef< FixItHint > Hints) override
 
void emitIncludeLocation (FullSourceLoc Loc, PresumedLoc PLoc) override
 
void emitImportLocation (FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
 
void emitBuildingModuleLocation (FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
 
- Protected Member Functions inherited from clang::DiagnosticRenderer
 DiagnosticRenderer (const LangOptions &LangOpts, DiagnosticOptions *DiagOpts)
 
virtual ~DiagnosticRenderer ()
 
virtual void emitDiagnosticMessage (FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, StringRef Message, ArrayRef< CharSourceRange > Ranges, DiagOrStoredDiag Info)=0
 
virtual void emitDiagnosticLoc (FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, ArrayRef< CharSourceRange > Ranges)=0
 
virtual void emitCodeContext (FullSourceLoc Loc, DiagnosticsEngine::Level Level, SmallVectorImpl< CharSourceRange > &Ranges, ArrayRef< FixItHint > Hints)=0
 
virtual void emitIncludeLocation (FullSourceLoc Loc, PresumedLoc PLoc)=0
 
virtual void emitImportLocation (FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName)=0
 
virtual void emitBuildingModuleLocation (FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName)=0
 
virtual void beginDiagnostic (DiagOrStoredDiag D, DiagnosticsEngine::Level Level)
 
virtual void endDiagnostic (DiagOrStoredDiag D, DiagnosticsEngine::Level Level)
 

Additional Inherited Members

- Protected Attributes inherited from clang::DiagnosticRenderer
const LangOptionsLangOpts
 
IntrusiveRefCntPtr< DiagnosticOptionsDiagOpts
 
SourceLocation LastLoc
 The location of the previous diagnostic if known.
 
SourceLocation LastIncludeLoc
 The location of the last include whose stack was printed if known.
 
DiagnosticsEngine::Level LastLevel = DiagnosticsEngine::Ignored
 The level of the last diagnostic emitted.
 

Detailed Description

Definition at line 23 of file SARIFDiagnostic.h.

Constructor & Destructor Documentation

◆ SARIFDiagnostic() [1/3]

clang::SARIFDiagnostic::SARIFDiagnostic ( raw_ostream &  OS,
const LangOptions LangOpts,
DiagnosticOptions DiagOpts,
SarifDocumentWriter Writer 
)

Definition at line 33 of file SARIFDiagnostic.cpp.

◆ ~SARIFDiagnostic()

clang::SARIFDiagnostic::~SARIFDiagnostic ( )
default

◆ SARIFDiagnostic() [2/3]

clang::SARIFDiagnostic::SARIFDiagnostic ( SARIFDiagnostic &&  )
delete

◆ SARIFDiagnostic() [3/3]

clang::SARIFDiagnostic::SARIFDiagnostic ( const SARIFDiagnostic )
delete

Member Function Documentation

◆ emitBuildingModuleLocation()

void clang::SARIFDiagnostic::emitBuildingModuleLocation ( FullSourceLoc  Loc,
PresumedLoc  PLoc,
StringRef  ModuleName 
)
overrideprotectedvirtual

Implements clang::DiagnosticRenderer.

Definition at line 219 of file SARIFDiagnostic.cpp.

◆ emitCodeContext()

void clang::SARIFDiagnostic::emitCodeContext ( FullSourceLoc  Loc,
DiagnosticsEngine::Level  Level,
SmallVectorImpl< CharSourceRange > &  Ranges,
ArrayRef< FixItHint Hints 
)
inlineoverrideprotectedvirtual

Implements clang::DiagnosticRenderer.

Definition at line 45 of file SARIFDiagnostic.h.

◆ emitDiagnosticLoc()

void clang::SARIFDiagnostic::emitDiagnosticLoc ( FullSourceLoc  Loc,
PresumedLoc  PLoc,
DiagnosticsEngine::Level  Level,
ArrayRef< CharSourceRange Ranges 
)
overrideprotectedvirtual

Print out the file/line/column information and include trace.

This method handlen the emission of the diagnostic location information. This includes extracting as much location information as is present for the diagnostic and printing it, as well as any include stack or source ranges necessary.

Implements clang::DiagnosticRenderer.

Definition at line 204 of file SARIFDiagnostic.cpp.

◆ emitDiagnosticMessage()

void clang::SARIFDiagnostic::emitDiagnosticMessage ( FullSourceLoc  Loc,
PresumedLoc  PLoc,
DiagnosticsEngine::Level  Level,
StringRef  Message,
ArrayRef< CharSourceRange Ranges,
DiagOrStoredDiag  D 
)
overrideprotectedvirtual

◆ emitImportLocation()

void clang::SARIFDiagnostic::emitImportLocation ( FullSourceLoc  Loc,
PresumedLoc  PLoc,
StringRef  ModuleName 
)
overrideprotectedvirtual

Implements clang::DiagnosticRenderer.

Definition at line 214 of file SARIFDiagnostic.cpp.

◆ emitIncludeLocation()

void clang::SARIFDiagnostic::emitIncludeLocation ( FullSourceLoc  Loc,
PresumedLoc  PLoc 
)
overrideprotectedvirtual

Implements clang::DiagnosticRenderer.

Definition at line 210 of file SARIFDiagnostic.cpp.

◆ operator=() [1/2]

SARIFDiagnostic & clang::SARIFDiagnostic::operator= ( const SARIFDiagnostic &&  )
delete

◆ operator=() [2/2]

SARIFDiagnostic & clang::SARIFDiagnostic::operator= ( const SARIFDiagnostic )
delete

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