class PathDiagnostic

Declaration

class PathDiagnostic : public Node { /* full declaration omitted */ };

Description

PathDiagnostic - PathDiagnostic objects represent a single path-sensitive diagnostic. It represents an ordered-collection of PathDiagnosticPieces, each which represent the pieces of the path.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:763

Inherits from: FoldingSetBase::Node

Member Variables

private std::string CheckerName
private const clang::Decl* DeclWithIssue
private std::string BugType
private std::string VerboseDesc
private std::string ShortDesc
private std::string Category
private std::deque<std::string> OtherDesc
private clang::ento::PathDiagnosticLocation Loc
Loc The location of the path diagnostic report.
private clang::ento::PathPieces pathImpl
private SmallVector<clang::ento::PathPieces*, 3> pathStack
private clang::ento::PathDiagnosticLocation UniqueingLoc
Important bug uniqueing location. The location info is useful to differentiate between bugs.
private const clang::Decl* UniqueingDecl
private std::unique_ptr<FilesToLineNumsMap> ExecutedLines
Lines executed in the path.
public const clang::ento::PathPieces& path

Method Overview

Inherited from FoldingSetBase::Node:

Methods

void FullProfile(llvm::FoldingSetNodeID& ID) const

Description

Profiles the diagnostic, including its path. Two diagnostics with the same issue along different paths will generate different profiles.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:898

Parameters

llvm::FoldingSetNodeID& ID

PathDiagnostic(llvm::StringRef CheckerName,
               const clang::Decl* DeclWithIssue,
               llvm::StringRef bugtype,
               llvm::StringRef verboseDesc,
               llvm::StringRef shortDesc,
               llvm::StringRef category,
               clang::ento::PathDiagnosticLocation
                   LocationToUnique,
               const clang::Decl* DeclToUnique,
               std::unique_ptr<FilesToLineNumsMap>
                   ExecutedLines)

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:788

Parameters

llvm::StringRef CheckerName
const clang::Decl* DeclWithIssue
llvm::StringRef bugtype
llvm::StringRef verboseDesc
llvm::StringRef shortDesc
llvm::StringRef category
clang::ento::PathDiagnosticLocation LocationToUnique
const clang::Decl* DeclToUnique
std::unique_ptr<FilesToLineNumsMap> ExecutedLines

PathDiagnostic()

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:787

void Profile(llvm::FoldingSetNodeID& ID) const

Description

Profiles the diagnostic, independent of the path it references. This can be used to merge diagnostics that refer to the same issue along different paths.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:892

Parameters

llvm::FoldingSetNodeID& ID

void addMeta(llvm::StringRef s)

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:845

Parameters

llvm::StringRef s

void appendToDesc(llvm::StringRef S)

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:825

Parameters

llvm::StringRef S

void flattenLocations()

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:882

unsigned int full_size()

Description

Return the unrolled size of the path.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:811

clang::ento::PathPieces& getActivePath()

Description

Return the path currently used by builders for constructing the PathDiagnostic.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:799

llvm::StringRef getBugType() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:838

llvm::StringRef getCategory() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:839

llvm::StringRef getCheckerName() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:837

const clang::Decl* getDeclWithIssue() const

Description

Return the semantic context where an issue occurred. If the issue occurs along a path, this represents the "central" area where the bug manifests.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:858

const clang::ento::FilesToLineNumsMap&
getExecutedLines() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:847

clang::ento::FilesToLineNumsMap&
getExecutedLines()

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:851

clang::ento::PathDiagnosticLocation getLocation()
    const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:864

clang::ento::PathPieces& getMutablePieces()

Description

Return a mutable version of 'path'.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:806

llvm::StringRef getShortDescription() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:833

const clang::Decl* getUniqueingDecl() const

Description

Get the declaration containing the uniqueing location.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:878

clang::ento::PathDiagnosticLocation
getUniqueingLoc() const

Description

Get the location on which the report should be uniqued.

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:873

llvm::StringRef getVerboseDescription() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:831

bool isWithinCall() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:816

clang::ento::PathDiagnostic::meta_iterator
meta_begin() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:843

clang::ento::PathDiagnostic::meta_iterator
meta_end() const

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:844

void popActivePath()

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:814

void pushActivePath(clang::ento::PathPieces* p)

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:813

Parameters

clang::ento::PathPieces* p

void setDeclWithIssue(const clang::Decl* D)

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:860

Parameters

const clang::Decl* D

void setEndOfPath(
    clang::ento::PathDiagnosticPieceRef EndPiece)

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:818

Parameters

clang::ento::PathDiagnosticPieceRef EndPiece

void setLocation(
    clang::ento::PathDiagnosticLocation NewLoc)

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:868

Parameters

clang::ento::PathDiagnosticLocation NewLoc

~PathDiagnostic()

Declared at: clang/include/clang/Analysis/PathDiagnostic.h:793