clang 22.0.0git
clang::LoopExit Class Reference

Represents a point when we exit a loop. More...

#include "clang/Analysis/ProgramPoint.h"

Inheritance diagram for clang::LoopExit:
[legend]

Public Member Functions

 LoopExit (const Stmt *LoopStmt, const LocationContext *LC)
const StmtgetLoopStmt () const
Public Member Functions inherited from clang::ProgramPoint
std::optional< SourceLocationgetSourceLocation () const
ProgramPoint withTag (const ProgramPointTag *tag) const
 Create a new ProgramPoint object that is the same as the original except for using the specified tag value.
template<typename T>
T castAs () const
 Convert to the specified ProgramPoint type, asserting that this ProgramPoint is of the desired type.
template<typename T>
std::optional< TgetAs () const
 Convert to the specified ProgramPoint type, returning std::nullopt if this ProgramPoint is not of the desired type.
Kind getKind () const
bool isPurgeKind ()
 Is this a program point corresponding to purge/removal of dead symbols and bindings.
const ProgramPointTaggetTag () const
const LocationContextgetLocationContext () const
const StackFrameContextgetStackFrame () const
unsigned getHashValue () const
bool operator== (const ProgramPoint &RHS) const
bool operator!= (const ProgramPoint &RHS) const
void Profile (llvm::FoldingSetNodeID &ID) const
void printJson (llvm::raw_ostream &Out, const char *NL="\n") const
LLVM_DUMP_METHOD void dump () const

Friends

class ProgramPoint
 A ProgramPoint identifies a location in the CFG by pointing to a specific Fact.

Additional Inherited Members

Public Types inherited from clang::ProgramPoint
enum  Kind {
  BlockEdgeKind , BlockEntranceKind , BlockExitKind , PreStmtKind ,
  PreStmtPurgeDeadSymbolsKind , PostStmtPurgeDeadSymbolsKind , PostStmtKind , PreLoadKind ,
  PostLoadKind , PreStoreKind , PostStoreKind , PostConditionKind ,
  PostLValueKind , PostAllocatorCallKind , MinPostStmtKind = PostStmtKind , MaxPostStmtKind = PostAllocatorCallKind ,
  PostInitializerKind , CallEnterKind , CallExitBeginKind , CallExitEndKind ,
  FunctionExitKind , PreImplicitCallKind , PostImplicitCallKind , MinImplicitCallKind = PreImplicitCallKind ,
  MaxImplicitCallKind = PostImplicitCallKind , LoopExitKind , EpsilonKind
}
Static Public Member Functions inherited from clang::ProgramPoint
static StringRef getProgramPointKindName (Kind K)
static ProgramPoint getProgramPoint (const Stmt *S, ProgramPoint::Kind K, const LocationContext *LC, const ProgramPointTag *tag)
Protected Member Functions inherited from clang::ProgramPoint
 ProgramPoint ()=default
 ProgramPoint (const void *P, Kind k, const LocationContext *l, const ProgramPointTag *tag=nullptr, CFGBlock::ConstCFGElementRef ElemRef={nullptr, 0})
 ProgramPoint (const void *P1, const void *P2, Kind k, const LocationContext *l, const ProgramPointTag *tag=nullptr, CFGBlock::ConstCFGElementRef ElemRef={nullptr, 0})
const void * getData1 () const
const void * getData2 () const
void setData2 (const void *d)
CFGBlock::ConstCFGElementRef getElementRef () const

Detailed Description

Represents a point when we exit a loop.

When this ProgramPoint is encountered we can be sure that the symbolic execution of the corresponding LoopStmt is finished on the given path. Note: It is possible to encounter a LoopExit element when we haven't even encountered the loop itself. At the current state not all loop exits will result in a LoopExit program point.

Definition at line 721 of file ProgramPoint.h.

Constructor & Destructor Documentation

◆ LoopExit()

clang::LoopExit::LoopExit ( const Stmt * LoopStmt,
const LocationContext * LC )
inline

Definition at line 723 of file ProgramPoint.h.

References clang::ProgramPoint::LoopExitKind, clang::nullptr, and ProgramPoint.

Member Function Documentation

◆ getLoopStmt()

const Stmt * clang::LoopExit::getLoopStmt ( ) const
inline

Definition at line 726 of file ProgramPoint.h.

References clang::ProgramPoint::getData1().

◆ ProgramPoint

friend class ProgramPoint
friend

A ProgramPoint identifies a location in the CFG by pointing to a specific Fact.

identified by a lifetime-related event (Fact).

A ProgramPoint has "after" semantics: it represents the location immediately after its corresponding Fact.

Definition at line 731 of file ProgramPoint.h.

References clang::ProgramPoint::LoopExitKind, and ProgramPoint.

Referenced by LoopExit(), and ProgramPoint.


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