clang 19.0.0git
Public Types | Public Member Functions | List of all members
clang::CFGTerminator Class Reference

Represents CFGBlock terminator statement. More...

#include "clang/Analysis/CFG.h"

Public Types

enum  Kind { StmtBranch , TemporaryDtorsBranch , VirtualBaseBranch , NumKindsMinusOne = VirtualBaseBranch }

Public Member Functions

 CFGTerminator ()
 CFGTerminator (Stmt *S, Kind K=StmtBranch)
bool isValid () const
StmtgetStmt ()
const StmtgetStmt () const
Kind getKind () const
bool isStmtBranch () const
bool isTemporaryDtorsBranch () const
bool isVirtualBaseBranch () const

Detailed Description

Represents CFGBlock terminator statement.

Definition at line 531 of file CFG.h.

Member Enumeration Documentation

◆ Kind


A branch that corresponds to a statement in the code, such as an if-statement.


A branch in control flow of destructors of temporaries.

In this case terminator statement is the same statement that branches control flow in evaluation of matching full expression.


A shortcut around virtual base initializers.

It gets taken when virtual base classes have already been initialized by the constructor of the most derived class while we're in the base class.


Number of different kinds, for assertions.

We subtract 1 so that to keep receiving compiler warnings when we don't cover all enum values in a switch.

Definition at line 533 of file CFG.h.

Constructor & Destructor Documentation

◆ CFGTerminator() [1/2]

clang::CFGTerminator::CFGTerminator ( )

Definition at line 559 of file CFG.h.

References isValid().

◆ CFGTerminator() [2/2]

clang::CFGTerminator::CFGTerminator ( Stmt S,
Kind  K = StmtBranch 

Definition at line 560 of file CFG.h.

References Data.

Member Function Documentation

◆ getKind()

Kind clang::CFGTerminator::getKind ( ) const

◆ getStmt() [1/2]

Stmt * clang::CFGTerminator::getStmt ( )

◆ getStmt() [2/2]

const Stmt * clang::CFGTerminator::getStmt ( ) const

Definition at line 564 of file CFG.h.

References Data.

◆ isStmtBranch()

bool clang::CFGTerminator::isStmtBranch ( ) const

Definition at line 567 of file CFG.h.

References getKind(), and StmtBranch.

Referenced by ResolveCondition().

◆ isTemporaryDtorsBranch()

bool clang::CFGTerminator::isTemporaryDtorsBranch ( ) const

Definition at line 570 of file CFG.h.

References getKind(), and TemporaryDtorsBranch.

◆ isValid()

bool clang::CFGTerminator::isValid ( ) const

Definition at line 562 of file CFG.h.

References Data.

Referenced by CFGTerminator(), and print_block().

◆ isVirtualBaseBranch()

bool clang::CFGTerminator::isVirtualBaseBranch ( ) const

Definition at line 573 of file CFG.h.

References getKind(), and VirtualBaseBranch.

Referenced by clang::ento::PathDiagnosticLocation::create().

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