clang-tools 6.0.0

Public Member Functions | List of all members
clang::tidy::utils::StmtToBlockMap Class Reference

Maps `Stmt`s 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 `Stmt`s to the `CFGBlock` that contains them.

Some `Stmt`s 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 `Stmt`s 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:

- ExprSequence.h
- ExprSequence.cpp