clang 20.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::ento::PathDiagnosticCallPiece Class Reference

#include "clang/Analysis/PathDiagnostic.h"

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

Public Member Functions

 ~PathDiagnosticCallPiece () override
 
const DeclgetCaller () const
 
const DeclgetCallee () const
 
void setCallee (const CallEnter &CE, const SourceManager &SM)
 
bool hasCallStackMessage ()
 
void setCallStackMessage (StringRef st)
 
PathDiagnosticLocation getLocation () const override
 
std::shared_ptr< PathDiagnosticEventPiecegetCallEnterEvent () const
 
std::shared_ptr< PathDiagnosticEventPiecegetCallEnterWithinCallerEvent () const
 
std::shared_ptr< PathDiagnosticEventPiecegetCallExitEvent () const
 
void flattenLocations () override
 
void dump () const override
 
void Profile (llvm::FoldingSetNodeID &ID) const override
 
- Public Member Functions inherited from clang::ento::PathDiagnosticPiece
 PathDiagnosticPiece ()=delete
 
 PathDiagnosticPiece (const PathDiagnosticPiece &)=delete
 
PathDiagnosticPieceoperator= (const PathDiagnosticPiece &)=delete
 
virtual ~PathDiagnosticPiece ()
 
StringRef getString () const
 
void setTag (const char *tag)
 Tag this PathDiagnosticPiece with the given C-string.
 
const void * getTag () const
 Return the opaque tag (if any) on the PathDiagnosticPiece.
 
StringRef getTagStr () const
 Return the string representation of the tag.
 
DisplayHint getDisplayHint () const
 getDisplayHint - Return a hint indicating where the diagnostic should be displayed by the PathDiagnosticConsumer.
 
virtual PathDiagnosticLocation getLocation () const =0
 
virtual void flattenLocations ()=0
 
Kind getKind () const
 
void addRange (SourceRange R)
 
void addRange (SourceLocation B, SourceLocation E)
 
void addFixit (FixItHint F)
 
ArrayRef< SourceRangegetRanges () const
 Return the SourceRanges associated with this PathDiagnosticPiece.
 
ArrayRef< FixItHintgetFixits () const
 Return the fix-it hints associated with this PathDiagnosticPiece.
 
virtual void Profile (llvm::FoldingSetNodeID &ID) const
 
void setAsLastInMainSourceFile ()
 
bool isLastInMainSourceFile () const
 
virtual void dump () const =0
 

Static Public Member Functions

static std::shared_ptr< PathDiagnosticCallPiececonstruct (const CallExitEnd &CE, const SourceManager &SM)
 
static PathDiagnosticCallPiececonstruct (PathPieces &pieces, const Decl *caller)
 
static bool classof (const PathDiagnosticPiece *P)
 

Public Attributes

PathDiagnosticLocation callEnter
 
PathDiagnosticLocation callEnterWithin
 
PathDiagnosticLocation callReturn
 
PathPieces path
 

Additional Inherited Members

- Public Types inherited from clang::ento::PathDiagnosticPiece
enum  Kind {
  ControlFlow , Event , Macro , Call ,
  Note , PopUp
}
 
enum  DisplayHint { Above , Below }
 
- Protected Member Functions inherited from clang::ento::PathDiagnosticPiece
 PathDiagnosticPiece (StringRef s, Kind k, DisplayHint hint=Below)
 
 PathDiagnosticPiece (Kind k, DisplayHint hint=Below)
 

Detailed Description

Definition at line 562 of file PathDiagnostic.h.

Constructor & Destructor Documentation

◆ ~PathDiagnosticCallPiece()

PathDiagnosticCallPiece::~PathDiagnosticCallPiece ( )
overridedefault

Member Function Documentation

◆ classof()

static bool clang::ento::PathDiagnosticCallPiece::classof ( const PathDiagnosticPiece P)
inlinestatic

Definition at line 627 of file PathDiagnostic.h.

References clang::ento::PathDiagnosticPiece::Call, and P.

◆ construct() [1/2]

std::shared_ptr< PathDiagnosticCallPiece > PathDiagnosticCallPiece::construct ( const CallExitEnd CE,
const SourceManager SM 
)
static

◆ construct() [2/2]

PathDiagnosticCallPiece * PathDiagnosticCallPiece::construct ( PathPieces pieces,
const Decl caller 
)
static

Definition at line 860 of file PathDiagnostic.cpp.

References clang::C.

◆ dump()

LLVM_DUMP_METHOD void PathDiagnosticCallPiece::dump ( ) const
overridevirtual

Implements clang::ento::PathDiagnosticPiece.

Definition at line 1161 of file PathDiagnostic.cpp.

◆ flattenLocations()

void clang::ento::PathDiagnosticCallPiece::flattenLocations ( )
inlineoverridevirtual

◆ getCallee()

const Decl * clang::ento::PathDiagnosticCallPiece::getCallee ( ) const
inline

Definition at line 596 of file PathDiagnostic.h.

Referenced by resetDiagnosticLocationToMainFile().

◆ getCallEnterEvent()

std::shared_ptr< PathDiagnosticEventPiece > PathDiagnosticCallPiece::getCallEnterEvent ( ) const

Definition at line 1004 of file PathDiagnostic.cpp.

References describeCodeDecl().

◆ getCallEnterWithinCallerEvent()

std::shared_ptr< PathDiagnosticEventPiece > PathDiagnosticCallPiece::getCallEnterWithinCallerEvent ( ) const

Definition at line 1023 of file PathDiagnostic.cpp.

References describeCodeDecl().

◆ getCaller()

const Decl * clang::ento::PathDiagnosticCallPiece::getCaller ( ) const
inline

Definition at line 594 of file PathDiagnostic.h.

Referenced by resetDiagnosticLocationToMainFile().

◆ getCallExitEvent()

std::shared_ptr< PathDiagnosticEventPiece > PathDiagnosticCallPiece::getCallExitEvent ( ) const

Definition at line 1042 of file PathDiagnostic.cpp.

References describeCodeDecl().

◆ getLocation()

PathDiagnosticLocation clang::ento::PathDiagnosticCallPiece::getLocation ( ) const
inlineoverridevirtual

Implements clang::ento::PathDiagnosticPiece.

Definition at line 602 of file PathDiagnostic.h.

References callEnter.

Referenced by resetDiagnosticLocationToMainFile().

◆ hasCallStackMessage()

bool clang::ento::PathDiagnosticCallPiece::hasCallStackMessage ( )
inline

Definition at line 599 of file PathDiagnostic.h.

◆ Profile()

void PathDiagnosticCallPiece::Profile ( llvm::FoldingSetNodeID &  ID) const
overridevirtual

Reimplemented from clang::ento::PathDiagnosticPiece.

Definition at line 1105 of file PathDiagnostic.cpp.

References clang::ento::PathDiagnosticPiece::Profile().

◆ setCallee()

void PathDiagnosticCallPiece::setCallee ( const CallEnter CE,
const SourceManager SM 
)

◆ setCallStackMessage()

void clang::ento::PathDiagnosticCallPiece::setCallStackMessage ( StringRef  st)
inline

Definition at line 600 of file PathDiagnostic.h.

Member Data Documentation

◆ callEnter

PathDiagnosticLocation clang::ento::PathDiagnosticCallPiece::callEnter

◆ callEnterWithin

PathDiagnosticLocation clang::ento::PathDiagnosticCallPiece::callEnterWithin

Definition at line 588 of file PathDiagnostic.h.

Referenced by compareCall(), and getFirstStackedCallToHeaderFile().

◆ callReturn

PathDiagnosticLocation clang::ento::PathDiagnosticCallPiece::callReturn

Definition at line 589 of file PathDiagnostic.h.

Referenced by compareCall(), and flattenLocations().

◆ path

PathPieces clang::ento::PathDiagnosticCallPiece::path

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