clang 22.0.0git
clang::SARIFDiagnostic Class Reference

#include "clang/Frontend/SARIFDiagnostic.h"

Inheritance diagram for clang::SARIFDiagnostic:
[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 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
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 )

◆ ~SARIFDiagnostic()

clang::SARIFDiagnostic::~SARIFDiagnostic ( )
default

◆ SARIFDiagnostic() [2/3]

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

References SARIFDiagnostic().

◆ SARIFDiagnostic() [3/3]

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

References SARIFDiagnostic().

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

References SARIFDiagnostic().

◆ operator=() [2/2]

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

References SARIFDiagnostic().


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