clang 19.0.0git
Public Member Functions | Friends | List of all members
clang::CFGLoopExit Class Reference

Represents the point where a loop ends. More...

#include "clang/Analysis/CFG.h"

Inheritance diagram for clang::CFGLoopExit:
Inheritance graph
[legend]

Public Member Functions

 CFGLoopExit (const Stmt *stmt)
 
const StmtgetLoopStmt () const
 
- Public Member Functions inherited from clang::CFGElement
template<typename T >
T castAs () const
 Convert to the specified CFGElement type, asserting that this CFGElement is of the desired type.
 
template<typename T >
std::optional< TgetAs () const
 Convert to the specified CFGElement type, returning std::nullopt if this CFGElement is not of the desired type.
 
Kind getKind () const
 
void dumpToStream (llvm::raw_ostream &OS) const
 
void dump () const
 

Friends

class CFGElement
 

Additional Inherited Members

- Public Types inherited from clang::CFGElement
enum  Kind {
  Initializer , ScopeBegin , ScopeEnd , NewAllocator ,
  LifetimeEnds , LoopExit , Statement , Constructor ,
  CXXRecordTypedCall , STMT_BEGIN = Statement , STMT_END = CXXRecordTypedCall , AutomaticObjectDtor ,
  DeleteDtor , BaseDtor , MemberDtor , TemporaryDtor ,
  DTOR_BEGIN = AutomaticObjectDtor , DTOR_END = TemporaryDtor , CleanupFunction
}
 
- Protected Member Functions inherited from clang::CFGElement
 CFGElement (Kind kind, const void *Ptr1, const void *Ptr2=nullptr)
 
 CFGElement ()=default
 
- Protected Attributes inherited from clang::CFGElement
llvm::PointerIntPair< void *, 2 > Data1
 
llvm::PointerIntPair< void *, 2 > Data2
 

Detailed Description

Represents the point where a loop ends.

This element is only produced when building the CFG for the static analyzer and hidden behind the 'cfg-loopexit' analyzer config flag.

Note: a loop exit element can be reached even when the loop body was never entered.

Definition at line 273 of file CFG.h.

Constructor & Destructor Documentation

◆ CFGLoopExit()

clang::CFGLoopExit::CFGLoopExit ( const Stmt stmt)
inlineexplicit

Definition at line 275 of file CFG.h.

Member Function Documentation

◆ getLoopStmt()

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

Definition at line 277 of file CFG.h.

References clang::CFGElement::Data1.

Referenced by clang::ento::ExprEngine::processCFGElement().

Friends And Related Function Documentation

◆ CFGElement

friend class CFGElement
friend

Definition at line 282 of file CFG.h.


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