clang  13.0.0git
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
clang::ento::PathDiagnosticConsumer Class Referenceabstract

#include "clang/Analysis/PathDiagnostic.h"

Collaboration diagram for clang::ento::PathDiagnosticConsumer:
Collaboration graph


class  FilesMade
class  PDFileEntry

Public Types

enum  PathGenerationScheme { None, Minimal, Extensive }

Public Member Functions

 PathDiagnosticConsumer ()=default
virtual ~PathDiagnosticConsumer ()
void FlushDiagnostics (FilesMade *FilesMade)
virtual void FlushDiagnosticsImpl (std::vector< const PathDiagnostic * > &Diags, FilesMade *filesMade)=0
virtual StringRef getName () const =0
void HandlePathDiagnostic (std::unique_ptr< PathDiagnostic > D)
virtual PathGenerationScheme getGenerationScheme () const
bool shouldGenerateDiagnostics () const
bool shouldAddPathEdges () const
virtual bool supportsLogicalOpControlFlow () const
virtual bool supportsCrossFileDiagnostics () const
 Return true if the PathDiagnosticConsumer supports individual PathDiagnostics that span multiple files. More...

Protected Attributes

bool flushed = false
llvm::FoldingSet< PathDiagnosticDiags

Detailed Description

Definition at line 100 of file PathDiagnostic.h.

Member Enumeration Documentation

◆ PathGenerationScheme


Only runs visitors, no output generated.


Used for HTML, SARIF, and text output.


Used for plist output, used for "arrows" generation.

Definition at line 150 of file PathDiagnostic.h.

Constructor & Destructor Documentation

◆ PathDiagnosticConsumer()

clang::ento::PathDiagnosticConsumer::PathDiagnosticConsumer ( )

◆ ~PathDiagnosticConsumer()

PathDiagnosticConsumer::~PathDiagnosticConsumer ( )

Definition at line 135 of file PathDiagnostic.cpp.

References Diag(), and Diags.

Member Function Documentation

◆ FlushDiagnostics()

void PathDiagnosticConsumer::FlushDiagnostics ( PathDiagnosticConsumer::FilesMade Files)

Definition at line 403 of file PathDiagnostic.cpp.

References compare(), Diags, FlushDiagnosticsImpl(), flushed, int, and clang::tooling::X().

◆ FlushDiagnosticsImpl()

virtual void clang::ento::PathDiagnosticConsumer::FlushDiagnosticsImpl ( std::vector< const PathDiagnostic * > &  Diags,
FilesMade filesMade 
pure virtual

Referenced by FlushDiagnostics().

◆ getGenerationScheme()

virtual PathGenerationScheme clang::ento::PathDiagnosticConsumer::getGenerationScheme ( ) const

Definition at line 161 of file PathDiagnostic.h.

References Minimal.

Referenced by shouldAddPathEdges(), and shouldGenerateDiagnostics().

◆ getName()

virtual StringRef clang::ento::PathDiagnosticConsumer::getName ( ) const
pure virtual

◆ HandlePathDiagnostic()

void PathDiagnosticConsumer::HandlePathDiagnostic ( std::unique_ptr< PathDiagnostic D)

◆ shouldAddPathEdges()

bool clang::ento::PathDiagnosticConsumer::shouldAddPathEdges ( ) const

Definition at line 167 of file PathDiagnostic.h.

References Extensive, and getGenerationScheme().

◆ shouldGenerateDiagnostics()

bool clang::ento::PathDiagnosticConsumer::shouldGenerateDiagnostics ( ) const

Definition at line 163 of file PathDiagnostic.h.

References getGenerationScheme(), and None.

◆ supportsCrossFileDiagnostics()

virtual bool clang::ento::PathDiagnosticConsumer::supportsCrossFileDiagnostics ( ) const

Return true if the PathDiagnosticConsumer supports individual PathDiagnostics that span multiple files.

Definition at line 173 of file PathDiagnostic.h.

Referenced by HandlePathDiagnostic().

◆ supportsLogicalOpControlFlow()

virtual bool clang::ento::PathDiagnosticConsumer::supportsLogicalOpControlFlow ( ) const

Definition at line 169 of file PathDiagnostic.h.

Member Data Documentation

◆ Diags

llvm::FoldingSet<PathDiagnostic> clang::ento::PathDiagnosticConsumer::Diags

◆ flushed

bool clang::ento::PathDiagnosticConsumer::flushed = false

Definition at line 176 of file PathDiagnostic.h.

Referenced by FlushDiagnostics().

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