clang  14.0.0git
Public Types | Public Member Functions | Protected Member Functions | List of all members
clang::ento::PathDiagnosticPiece Class Referenceabstract

#include "clang/Analysis/PathDiagnostic.h"

Inheritance diagram for clang::ento::PathDiagnosticPiece:
Inheritance graph
[legend]
Collaboration diagram for clang::ento::PathDiagnosticPiece:
Collaboration graph
[legend]

Public Types

enum  Kind {
  ControlFlow, Event, Macro, Call,
  Note, PopUp
}
 
enum  DisplayHint { Above, Below }
 

Public Member Functions

 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. More...
 
const void * getTag () const
 Return the opaque tag (if any) on the PathDiagnosticPiece. More...
 
StringRef getTagStr () const
 Return the string representation of the tag. More...
 
DisplayHint getDisplayHint () const
 getDisplayHint - Return a hint indicating where the diagnostic should be displayed by the PathDiagnosticConsumer. More...
 
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. More...
 
ArrayRef< FixItHintgetFixits () const
 Return the fix-it hints associated with this PathDiagnosticPiece. More...
 
virtual void Profile (llvm::FoldingSetNodeID &ID) const
 
void setAsLastInMainSourceFile ()
 
bool isLastInMainSourceFile () const
 
virtual void dump () const =0
 

Protected Member Functions

 PathDiagnosticPiece (StringRef s, Kind k, DisplayHint hint=Below)
 
 PathDiagnosticPiece (Kind k, DisplayHint hint=Below)
 

Detailed Description

Definition at line 405 of file PathDiagnostic.h.

Member Enumeration Documentation

◆ DisplayHint

Enumerator
Above 
Below 

Definition at line 408 of file PathDiagnostic.h.

◆ Kind

Enumerator
ControlFlow 
Event 
Macro 
Call 
Note 
PopUp 

Definition at line 407 of file PathDiagnostic.h.

Constructor & Destructor Documentation

◆ PathDiagnosticPiece() [1/4]

PathDiagnosticPiece::PathDiagnosticPiece ( StringRef  s,
Kind  k,
DisplayHint  hint = Below 
)
protected

Definition at line 61 of file PathDiagnostic.cpp.

◆ PathDiagnosticPiece() [2/4]

PathDiagnosticPiece::PathDiagnosticPiece ( Kind  k,
DisplayHint  hint = Below 
)
protected

Definition at line 65 of file PathDiagnostic.cpp.

◆ PathDiagnosticPiece() [3/4]

clang::ento::PathDiagnosticPiece::PathDiagnosticPiece ( )
delete

◆ PathDiagnosticPiece() [4/4]

clang::ento::PathDiagnosticPiece::PathDiagnosticPiece ( const PathDiagnosticPiece )
delete

◆ ~PathDiagnosticPiece()

PathDiagnosticPiece::~PathDiagnosticPiece ( )
virtualdefault

Member Function Documentation

◆ addFixit()

void clang::ento::PathDiagnosticPiece::addFixit ( FixItHint  F)
inline

Definition at line 471 of file PathDiagnostic.h.

◆ addRange() [1/2]

void clang::ento::PathDiagnosticPiece::addRange ( SourceLocation  B,
SourceLocation  E 
)
inline

Definition at line 465 of file PathDiagnostic.h.

References clang::SourceLocation::isValid().

◆ addRange() [2/2]

void clang::ento::PathDiagnosticPiece::addRange ( SourceRange  R)
inline

◆ dump()

virtual void clang::ento::PathDiagnosticPiece::dump ( ) const
pure virtual

◆ flattenLocations()

virtual void clang::ento::PathDiagnosticPiece::flattenLocations ( )
pure virtual

◆ getDisplayHint()

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

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

Definition at line 452 of file PathDiagnostic.h.

◆ getFixits()

ArrayRef<FixItHint> clang::ento::PathDiagnosticPiece::getFixits ( ) const
inline

Return the fix-it hints associated with this PathDiagnosticPiece.

Definition at line 479 of file PathDiagnostic.h.

◆ getKind()

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

Definition at line 457 of file PathDiagnostic.h.

Referenced by comparePiece().

◆ getLocation()

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

◆ getRanges()

ArrayRef<SourceRange> clang::ento::PathDiagnosticPiece::getRanges ( ) const
inline

Return the SourceRanges associated with this PathDiagnosticPiece.

Definition at line 476 of file PathDiagnostic.h.

Referenced by comparePiece(), and clang::ento::PathDiagnosticConsumer::HandlePathDiagnostic().

◆ getString()

StringRef clang::ento::PathDiagnosticPiece::getString ( ) const
inline

◆ getTag()

const void* clang::ento::PathDiagnosticPiece::getTag ( ) const
inline

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

Definition at line 444 of file PathDiagnostic.h.

◆ getTagStr()

StringRef clang::ento::PathDiagnosticPiece::getTagStr ( ) const
inline

Return the string representation of the tag.

This is useful for debugging.

Definition at line 448 of file PathDiagnostic.h.

◆ isLastInMainSourceFile()

bool clang::ento::PathDiagnosticPiece::isLastInMainSourceFile ( ) const
inline

Definition at line 487 of file PathDiagnostic.h.

◆ operator=()

PathDiagnosticPiece& clang::ento::PathDiagnosticPiece::operator= ( const PathDiagnosticPiece )
delete

◆ Profile()

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

◆ setAsLastInMainSourceFile()

void clang::ento::PathDiagnosticPiece::setAsLastInMainSourceFile ( )
inline

Definition at line 483 of file PathDiagnostic.h.

◆ setTag()

void clang::ento::PathDiagnosticPiece::setTag ( const char *  tag)
inline

Tag this PathDiagnosticPiece with the given C-string.

Definition at line 441 of file PathDiagnostic.h.


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