clang  14.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::ento::PathDiagnosticControlFlowPiece Class Reference

#include "clang/Analysis/PathDiagnostic.h"

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

Public Types

using iterator = std::vector< PathDiagnosticLocationPair >::iterator
 
using const_iterator = std::vector< PathDiagnosticLocationPair >::const_iterator
 
- Public Types inherited from clang::ento::PathDiagnosticPiece
enum  Kind {
  ControlFlow, Event, Macro, Call,
  Note, PopUp
}
 
enum  DisplayHint { Above, Below }
 

Public Member Functions

 PathDiagnosticControlFlowPiece (const PathDiagnosticLocation &startPos, const PathDiagnosticLocation &endPos, StringRef s)
 
 PathDiagnosticControlFlowPiece (const PathDiagnosticLocation &startPos, const PathDiagnosticLocation &endPos)
 
 ~PathDiagnosticControlFlowPiece () override
 
PathDiagnosticLocation getStartLocation () const
 
PathDiagnosticLocation getEndLocation () const
 
void setStartLocation (const PathDiagnosticLocation &L)
 
void setEndLocation (const PathDiagnosticLocation &L)
 
void push_back (const PathDiagnosticLocationPair &X)
 
PathDiagnosticLocation getLocation () const override
 
iterator begin ()
 
iterator end ()
 
void flattenLocations () override
 
const_iterator begin () const
 
const_iterator end () const
 
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. 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...
 
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...
 
void setAsLastInMainSourceFile ()
 
bool isLastInMainSourceFile () const
 

Static Public Member Functions

static bool classof (const PathDiagnosticPiece *P)
 

Additional Inherited Members

- 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 636 of file PathDiagnostic.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 692 of file PathDiagnostic.h.

◆ iterator

Definition at line 681 of file PathDiagnostic.h.

Constructor & Destructor Documentation

◆ PathDiagnosticControlFlowPiece() [1/2]

clang::ento::PathDiagnosticControlFlowPiece::PathDiagnosticControlFlowPiece ( const PathDiagnosticLocation startPos,
const PathDiagnosticLocation endPos,
StringRef  s 
)
inline

Definition at line 640 of file PathDiagnostic.h.

◆ PathDiagnosticControlFlowPiece() [2/2]

clang::ento::PathDiagnosticControlFlowPiece::PathDiagnosticControlFlowPiece ( const PathDiagnosticLocation startPos,
const PathDiagnosticLocation endPos 
)
inline

Definition at line 647 of file PathDiagnostic.h.

◆ ~PathDiagnosticControlFlowPiece()

PathDiagnosticControlFlowPiece::~PathDiagnosticControlFlowPiece ( )
overridedefault

Member Function Documentation

◆ begin() [1/2]

iterator clang::ento::PathDiagnosticControlFlowPiece::begin ( )
inline

Definition at line 683 of file PathDiagnostic.h.

◆ begin() [2/2]

const_iterator clang::ento::PathDiagnosticControlFlowPiece::begin ( ) const
inline

Definition at line 694 of file PathDiagnostic.h.

◆ classof()

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

Definition at line 697 of file PathDiagnostic.h.

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

◆ dump()

LLVM_DUMP_METHOD void PathDiagnosticControlFlowPiece::dump ( ) const
overridevirtual

Implements clang::ento::PathDiagnosticPiece.

Definition at line 1177 of file PathDiagnostic.cpp.

◆ end() [1/2]

iterator clang::ento::PathDiagnosticControlFlowPiece::end ( )
inline

Definition at line 684 of file PathDiagnostic.h.

◆ end() [2/2]

const_iterator clang::ento::PathDiagnosticControlFlowPiece::end ( ) const
inline

Definition at line 695 of file PathDiagnostic.h.

◆ flattenLocations()

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

Implements clang::ento::PathDiagnosticPiece.

Definition at line 686 of file PathDiagnostic.h.

◆ getEndLocation()

PathDiagnosticLocation clang::ento::PathDiagnosticControlFlowPiece::getEndLocation ( ) const
inline

Definition at line 661 of file PathDiagnostic.h.

Referenced by compareControlFlow().

◆ getLocation()

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

Implements clang::ento::PathDiagnosticPiece.

Definition at line 677 of file PathDiagnostic.h.

References getStartLocation().

◆ getStartLocation()

PathDiagnosticLocation clang::ento::PathDiagnosticControlFlowPiece::getStartLocation ( ) const
inline

Definition at line 655 of file PathDiagnostic.h.

Referenced by compareControlFlow(), and getLocation().

◆ Profile()

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

Reimplemented from clang::ento::PathDiagnosticPiece.

Definition at line 1114 of file PathDiagnostic.cpp.

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

◆ push_back()

void clang::ento::PathDiagnosticControlFlowPiece::push_back ( const PathDiagnosticLocationPair X)
inline

Definition at line 675 of file PathDiagnostic.h.

References clang::tooling::X().

◆ setEndLocation()

void clang::ento::PathDiagnosticControlFlowPiece::setEndLocation ( const PathDiagnosticLocation L)
inline

Definition at line 671 of file PathDiagnostic.h.

◆ setStartLocation()

void clang::ento::PathDiagnosticControlFlowPiece::setStartLocation ( const PathDiagnosticLocation L)
inline

Definition at line 667 of file PathDiagnostic.h.


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