clang 22.0.0git
clang::ento::PathSensitiveBugReporter Class Referencefinal

GRBugReporter is used for generating path-sensitive reports. More...

#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"

Inheritance diagram for clang::ento::PathSensitiveBugReporter:
[legend]

Public Member Functions

 PathSensitiveBugReporter (BugReporterData &d, ExprEngine &eng)
const ExplodedGraphgetGraph () const
 getGraph - Get the exploded graph created by the analysis engine for the analyzed method or function.
ProgramStateManagergetStateManager () const
 getStateManager - Return the state manager used by the analysis engine.
std::unique_ptr< DiagnosticForConsumerMapTygeneratePathDiagnostics (ArrayRef< std::unique_ptr< PathDiagnosticConsumer > > consumers, ArrayRef< PathSensitiveBugReport * > &bugReports)
 bugReports A set of bug reports within a single equivalence class
void emitReport (std::unique_ptr< BugReport > R) override
 Add the given report to the set of reports tracked by BugReporter.
Public Member Functions inherited from clang::ento::BugReporter
 BugReporter (BugReporterData &d)
virtual ~BugReporter ()
void FlushReports ()
 Generate and flush diagnostics for all bug reports.
ArrayRef< std::unique_ptr< PathDiagnosticConsumer > > getPathDiagnosticConsumers ()
llvm::iterator_range< EQClasses_iteratorequivalenceClasses ()
ASTContextgetContext ()
const SourceManagergetSourceManager ()
const SourceManagergetSourceManager () const
const AnalyzerOptionsgetAnalyzerOptions ()
PreprocessorgetPreprocessor ()
const PreprocessorgetPreprocessor () const
const DeclgetAnalysisEntryPoint () const
 Get the top-level entry point for the issue to be reported.
void setAnalysisEntryPoint (const Decl *EntryPoint)
void EmitBasicReport (const Decl *DeclWithIssue, const CheckerFrontend *Checker, StringRef BugName, StringRef BugCategory, StringRef BugStr, PathDiagnosticLocation Loc, ArrayRef< SourceRange > Ranges={}, ArrayRef< FixItHint > Fixits={})
void EmitBasicReport (const Decl *DeclWithIssue, CheckerNameRef CheckerName, StringRef BugName, StringRef BugCategory, StringRef BugStr, PathDiagnosticLocation Loc, ArrayRef< SourceRange > Ranges={}, ArrayRef< FixItHint > Fixits={})

Additional Inherited Members

Public Types inherited from clang::ento::BugReporter
using EQClasses_iterator = llvm::FoldingSet<BugReportEquivClass>::iterator
 Iterator over the set of BugReports tracked by the BugReporter.

Detailed Description

GRBugReporter is used for generating path-sensitive reports.

Definition at line 685 of file BugReporter.h.

Constructor & Destructor Documentation

◆ PathSensitiveBugReporter()

clang::ento::PathSensitiveBugReporter::PathSensitiveBugReporter ( BugReporterData & d,
ExprEngine & eng )
inline

Definition at line 699 of file BugReporter.h.

References clang::ento::BugReporter::BugReporter().

Member Function Documentation

◆ emitReport()

void PathSensitiveBugReporter::emitReport ( std::unique_ptr< BugReport > R)
overridevirtual

Add the given report to the set of reports tracked by BugReporter.

The reports are usually generated by the checkers. Further, they are folded based on the profile value, which is done to coalesce similar reports.

Reimplemented from clang::ento::BugReporter.

Definition at line 3004 of file BugReporter.cpp.

References clang::ento::BugReporter::emitReport(), clang::AnalysisDeclContext::isBodyAutosynthesized(), and clang::AnalysisDeclContext::isBodyAutosynthesizedFromModelFile().

◆ generatePathDiagnostics()

std::unique_ptr< DiagnosticForConsumerMapTy > PathSensitiveBugReporter::generatePathDiagnostics ( ArrayRef< std::unique_ptr< PathDiagnosticConsumer > > consumers,
ArrayRef< PathSensitiveBugReport * > & bugReports )

bugReports A set of bug reports within a single equivalence class

Returns
A mapping from consumers to the corresponding diagnostics. Iterates through the bug reports within a single equivalence class, stops at a first non-invalidated report.

Definition at line 2955 of file BugReporter.cpp.

◆ getGraph()

const ExplodedGraph & PathSensitiveBugReporter::getGraph ( ) const

getGraph - Get the exploded graph created by the analysis engine for the analyzed method or function.

Definition at line 2519 of file BugReporter.cpp.

◆ getStateManager()

ProgramStateManager & PathSensitiveBugReporter::getStateManager ( ) const

getStateManager - Return the state manager used by the analysis engine.

Definition at line 2523 of file BugReporter.cpp.


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