clang 20.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. | |
void | setParent (const Stmt *S, const Stmt *Parent) |
Manually sets the parent of S to Parent . | |
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 110 of file ParentMap.cpp.
References BuildParentMap().
ParentMap::~ParentMap | ( | ) |
Definition at line 118 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 122 of file ParentMap.cpp.
References BuildParentMap().
Definition at line 165 of file ParentMap.cpp.
References getParent(), and Paren.
Definition at line 42 of file ParentMap.h.
References getParent().
Definition at line 135 of file ParentMap.cpp.
Referenced by addParentsForSyntheticStmts(), findExecutedLines(), getOuterParenParent(), getParent(), getParentIgnoreParenCasts(), getParentIgnoreParenImpCasts(), getParentIgnoreParens(), clang::ento::PathDiagnosticLocation::getValidSourceLocation(), hasParent(), isConsumedExpr(), isContainedByStmt(), isDeadReturn(), isInLoop(), lexicalContains(), and removePunyEdges().
Definition at line 50 of file ParentMap.h.
References getParentIgnoreParenCasts().
Definition at line 147 of file ParentMap.cpp.
References getParent().
Referenced by clang::ento::ObjCMethodCall::getMessageKind(), getParentIgnoreParenCasts(), and rewriteToArrayLiteral().
Definition at line 156 of file ParentMap.cpp.
References getParent().
Definition at line 46 of file ParentMap.h.
References getParentIgnoreParens().
Definition at line 140 of file ParentMap.cpp.
References getParent().
Referenced by clang::CFGStmtMap::getBlock(), getEnclosingParent(), getParentIgnoreParens(), and getStmtParent().
Definition at line 54 of file ParentMap.h.
References getParent().
Definition at line 58 of file ParentMap.h.
References E, and isConsumedExpr().
Definition at line 174 of file ParentMap.cpp.
References E, clang::BinaryOperator::getOpcode(), getParent(), clang::BinaryOperator::getRHS(), and P.
Referenced by getEnclosingParent(), isConsumedExpr(), optimizeEdges(), and shouldRemoveDeadBindings().
Manually sets the parent of S
to Parent
.
If S
is already in the map, this method will update the mapping.
Definition at line 128 of file ParentMap.cpp.
References Parent.
Referenced by addParentsForSyntheticStmts().