clang-tools  6.0.0svn
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. More...
 
const CFGBlock * blockContainingStmt (const Stmt *S) const
 Returns the block that S is contained in. More...
 

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 104 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 159 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 169 of file ExprSequence.cpp.

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


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