class PathDiagnosticPiece

Declaration

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

Description

Node - This class is used to maintain the singly linked bucket list in a folding set.

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

Inherits from: FoldingSetBase::Node

Member Variables

private const std::string str
private const clang::ento::PathDiagnosticPiece::Kind kind
private const clang::ento::PathDiagnosticPiece:: DisplayHint Hint
private bool LastInMainSourceFile = false
In the containing bug report, this piece is the last piece from the main source file.
private llvm::StringRef Tag
A constant string that can be used to tag the PathDiagnosticPiece, typically with the identification of the creator. The actual pointer value is meant to be an identifier; the string itself is useful for debugging.
private std::vector<SourceRange> ranges
private std::vector<FixItHint> fixits

Method Overview

Inherited from FoldingSetBase::Node:

Methods

PathDiagnosticPiece(
    clang::ento::PathDiagnosticPiece::Kind k,
    clang::ento::PathDiagnosticPiece::DisplayHint
        hint = Below)

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

Parameters

clang::ento::PathDiagnosticPiece::Kind k
clang::ento::PathDiagnosticPiece::DisplayHint hint = Below

PathDiagnosticPiece()

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

PathDiagnosticPiece(
    const clang::ento::PathDiagnosticPiece&)

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

Parameters

const clang::ento::PathDiagnosticPiece&

PathDiagnosticPiece(
    llvm::StringRef s,
    clang::ento::PathDiagnosticPiece::Kind k,
    clang::ento::PathDiagnosticPiece::DisplayHint
        hint = Below)

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

Parameters

llvm::StringRef s
clang::ento::PathDiagnosticPiece::Kind k
clang::ento::PathDiagnosticPiece::DisplayHint hint = Below

virtual void Profile(
    llvm::FoldingSetNodeID& ID) const

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

Parameters

llvm::FoldingSetNodeID& ID

void addFixit(clang::FixItHint F)

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

Parameters

clang::FixItHint F

void addRange(clang::SourceLocation B,
              clang::SourceLocation E)

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

Parameters

clang::SourceLocation B
clang::SourceLocation E

void addRange(clang::SourceRange R)

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

Parameters

clang::SourceRange R

virtual void dump() const

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

virtual void flattenLocations()

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

clang::ento::PathDiagnosticPiece::DisplayHint
getDisplayHint() const

Description

getDisplayHint - Return a hint indicating where the diagnostic should be displayed by the PathDiagnosticConsumer.

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

ArrayRef<clang::FixItHint> getFixits() const

Description

Return the fix-it hints associated with this PathDiagnosticPiece.

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

clang::ento::PathDiagnosticPiece::Kind getKind()
    const

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

virtual clang::ento::PathDiagnosticLocation
getLocation() const

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

ArrayRef<clang::SourceRange> getRanges() const

Description

Return the SourceRanges associated with this PathDiagnosticPiece.

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

llvm::StringRef getString() const

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

const void* getTag() const

Description

Return the opaque tag (if any) on the PathDiagnosticPiece.

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

llvm::StringRef getTagStr() const

Description

Return the string representation of the tag. This is useful for debugging.

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

bool isLastInMainSourceFile() const

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

void setAsLastInMainSourceFile()

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

void setTag(const char* tag)

Description

Tag this PathDiagnosticPiece with the given C-string.

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

Parameters

const char* tag

virtual ~PathDiagnosticPiece()

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