clang-tools 20.0.0git
Public Member Functions | List of all members
clang::tidy::utils::StmtToBlockMap Class Reference

Maps Stmts to the CFGBlock that contains them. More...

#include <ExprSequence.h>

Public Member Functions

 StmtToBlockMap (const CFG *TheCFG, ASTContext *TheContext)
 Initializes the map for the given CFG.
 
const CFGBlock * blockContainingStmt (const Stmt *S) const
 Returns the block that S is contained in.
 

Detailed Description

Maps Stmts to the CFGBlock that contains them.

Some Stmts may be contained in more than one CFGBlock; in this case, they are mapped to the innermost block (i.e. the one that is furthest from the root of the tree).

Definition at line 102 of file ExprSequence.h.

Constructor & Destructor Documentation

◆ StmtToBlockMap()

clang::tidy::utils::StmtToBlockMap::StmtToBlockMap ( const CFG *  TheCFG,
ASTContext *  TheContext 
)

Initializes the map for the given CFG.

Definition at line 268 of file ExprSequence.cpp.

Member Function Documentation

◆ blockContainingStmt()

const CFGBlock * clang::tidy::utils::StmtToBlockMap::blockContainingStmt ( const Stmt *  S) const

Returns the block that S is contained in.

Some Stmts may be contained in more than one CFGBlock; in this case, this function returns the innermost block (i.e. the one that is furthest from the root of the tree).

Definition at line 278 of file ExprSequence.cpp.

References clang::tidy::utils::getParentStmts().


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