clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
clang::ento::BugReporter Class Reference

#include <BugReporter.h>

Inheritance diagram for clang::ento::BugReporter:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Kind { BaseBRKind, GRBugReporterKind }
typedef BugTypesTy::iterator iterator
 Iterator over the set of BugTypes tracked by the BugReporter.
typedef llvm::FoldingSet
< BugReportEquivClass >
::iterator 
EQClasses_iterator
 Iterator over the set of BugReports tracked by the BugReporter.

Public Member Functions

 BugReporter (BugReporterData &d)
virtual ~BugReporter ()
void FlushReports ()
 Generate and flush diagnostics for all bug reports.
Kind getKind () const
DiagnosticsEnginegetDiagnostic ()
PathDiagnosticConsumergetPathDiagnosticConsumer ()
iterator begin ()
iterator end ()
EQClasses_iterator EQClasses_begin ()
EQClasses_iterator EQClasses_end ()
ASTContextgetContext ()
SourceManagergetSourceManager ()
virtual void GeneratePathDiagnostic (PathDiagnostic &pathDiagnostic, SmallVectorImpl< BugReport * > &bugReports)
void Register (BugType *BT)
void EmitReport (BugReport *R)
 Add the given report to the set of reports tracked by BugReporter.
void EmitBasicReport (const Decl *DeclWithIssue, StringRef BugName, StringRef BugCategory, StringRef BugStr, PathDiagnosticLocation Loc, SourceRange *RangeBeg, unsigned NumRanges)
void EmitBasicReport (const Decl *DeclWithIssue, StringRef BugName, StringRef BugCategory, StringRef BugStr, PathDiagnosticLocation Loc)
void EmitBasicReport (const Decl *DeclWithIssue, StringRef BugName, StringRef Category, StringRef BugStr, PathDiagnosticLocation Loc, SourceRange R)

Static Public Member Functions

static bool classof (const BugReporter *R)

Protected Member Functions

 BugReporter (BugReporterData &d, Kind k)

Detailed Description

BugReporter is a utility class for generating PathDiagnostics for analysis. It collects the BugReports and BugTypes and knows how to generate and flush the corresponding diagnostics.

Definition at line 292 of file BugReporter.h.


Member Typedef Documentation

Iterator over the set of BugReports tracked by the BugReporter.

Definition at line 340 of file BugReporter.h.

typedef BugTypesTy::iterator clang::ento::BugReporter::iterator

Iterator over the set of BugTypes tracked by the BugReporter.

Definition at line 335 of file BugReporter.h.


Member Enumeration Documentation

Enumerator:
BaseBRKind 
GRBugReporterKind 

Definition at line 294 of file BugReporter.h.


Constructor & Destructor Documentation

clang::ento::BugReporter::BugReporter ( BugReporterData d,
Kind  k 
) [inline, protected]

Definition at line 313 of file BugReporter.h.

clang::ento::BugReporter::BugReporter ( BugReporterData d) [inline]

Definition at line 317 of file BugReporter.h.

BugReporter::~BugReporter ( ) [virtual]

Definition at line 1500 of file BugReporter.cpp.


Member Function Documentation

iterator clang::ento::BugReporter::begin ( ) [inline]

Definition at line 336 of file BugReporter.h.

static bool clang::ento::BugReporter::classof ( const BugReporter R) [inline, static]

Reimplemented in clang::ento::GRBugReporter.

Definition at line 378 of file BugReporter.h.

void clang::ento::BugReporter::EmitBasicReport ( const Decl DeclWithIssue,
StringRef  BugName,
StringRef  BugCategory,
StringRef  BugStr,
PathDiagnosticLocation  Loc,
SourceRange RangeBeg,
unsigned  NumRanges 
)

Referenced by EmitBasicReport().

void clang::ento::BugReporter::EmitBasicReport ( const Decl DeclWithIssue,
StringRef  BugName,
StringRef  BugCategory,
StringRef  BugStr,
PathDiagnosticLocation  Loc 
) [inline]

Definition at line 365 of file BugReporter.h.

References EmitBasicReport().

void clang::ento::BugReporter::EmitBasicReport ( const Decl DeclWithIssue,
StringRef  BugName,
StringRef  Category,
StringRef  BugStr,
PathDiagnosticLocation  Loc,
SourceRange  R 
) [inline]

Definition at line 371 of file BugReporter.h.

References EmitBasicReport().

void clang::ento::BugReporter::EmitReport ( BugReport R)

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.

Referenced by clang::ento::CheckerContext::EmitReport().

iterator clang::ento::BugReporter::end ( ) [inline]

Definition at line 337 of file BugReporter.h.

EQClasses_iterator clang::ento::BugReporter::EQClasses_begin ( ) [inline]

Definition at line 341 of file BugReporter.h.

EQClasses_iterator clang::ento::BugReporter::EQClasses_end ( ) [inline]

Definition at line 342 of file BugReporter.h.

void clang::ento::BugReporter::FlushReports ( )

Generate and flush diagnostics for all bug reports.

Referenced by clang::ento::ExprEngine::~ExprEngine().

virtual void clang::ento::BugReporter::GeneratePathDiagnostic ( PathDiagnostic pathDiagnostic,
SmallVectorImpl< BugReport * > &  bugReports 
) [inline, virtual]

Reimplemented in clang::ento::GRBugReporter.

Definition at line 348 of file BugReporter.h.

ASTContext& clang::ento::BugReporter::getContext ( ) [inline]
DiagnosticsEngine& clang::ento::BugReporter::getDiagnostic ( ) [inline]

Definition at line 326 of file BugReporter.h.

References clang::ento::BugReporterData::getDiagnostic().

Kind clang::ento::BugReporter::getKind ( ) const [inline]

Definition at line 324 of file BugReporter.h.

Referenced by clang::ento::GRBugReporter::classof().

PathDiagnosticConsumer* clang::ento::BugReporter::getPathDiagnosticConsumer ( ) [inline]
SourceManager& clang::ento::BugReporter::getSourceManager ( ) [inline]
void BugReporter::Register ( BugType BT)

Definition at line 1869 of file BugReporter.cpp.


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