clang
19.0.0git
|
#include "clang/AST/ParentMap.h"
Public Member Functions | |
ParentMap (Stmt *ASTRoot) | |
~ParentMap () | |
void | addStmt (Stmt *S) |
Adds and/or updates the parent/child-relations of the complete stmt tree of S. More... | |
void | setParent (const Stmt *S, const Stmt *Parent) |
Manually sets the parent of S to Parent . More... | |
Stmt * | getParent (Stmt *) const |
Stmt * | getParentIgnoreParens (Stmt *) const |
Stmt * | getParentIgnoreParenCasts (Stmt *) const |
Stmt * | getParentIgnoreParenImpCasts (Stmt *) const |
Stmt * | getOuterParenParent (Stmt *) const |
const Stmt * | getParent (const Stmt *S) const |
const Stmt * | getParentIgnoreParens (const Stmt *S) const |
const Stmt * | getParentIgnoreParenCasts (const Stmt *S) const |
bool | hasParent (const Stmt *S) const |
bool | isConsumedExpr (Expr *E) const |
bool | isConsumedExpr (const Expr *E) const |
Definition at line 20 of file ParentMap.h.
ParentMap::ParentMap | ( | Stmt * | ASTRoot | ) |
Definition at line 127 of file ParentMap.cpp.
ParentMap::~ParentMap | ( | ) |
Definition at line 135 of file ParentMap.cpp.
void ParentMap::addStmt | ( | Stmt * | S | ) |
Adds and/or updates the parent/child-relations of the complete stmt tree of S.
All children of S including indirect descendants are visited and updated or inserted but not the parents of S.
Definition at line 139 of file ParentMap.cpp.
Definition at line 179 of file ParentMap.cpp.
Definition at line 42 of file ParentMap.h.
Definition at line 152 of file ParentMap.cpp.
Referenced by addParentsForSyntheticStmts(), isConsumedExpr(), lexicalContains(), and removePunyEdges().
Definition at line 50 of file ParentMap.h.
Definition at line 162 of file ParentMap.cpp.
Referenced by rewriteToArrayLiteral().
Definition at line 171 of file ParentMap.cpp.
Definition at line 46 of file ParentMap.h.
Definition at line 157 of file ParentMap.cpp.
Definition at line 54 of file ParentMap.h.
Definition at line 58 of file ParentMap.h.
References isConsumedExpr().
Definition at line 188 of file ParentMap.cpp.
References clang::BinaryOperator::getOpcode(), getParent(), clang::BinaryOperator::getRHS(), and P.
Referenced by isConsumedExpr(), and optimizeEdges().
Manually sets the parent of S
to Parent
.
If S
is already in the map, this method will update the mapping.
Definition at line 145 of file ParentMap.cpp.
Referenced by addParentsForSyntheticStmts().