clang  8.0.0svn
Public Member Functions | List of all members
clang::ParentMap Class Reference

#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...
 
StmtgetParent (Stmt *) const
 
StmtgetParentIgnoreParens (Stmt *) const
 
StmtgetParentIgnoreParenCasts (Stmt *) const
 
StmtgetParentIgnoreParenImpCasts (Stmt *) const
 
StmtgetOuterParenParent (Stmt *) const
 
const StmtgetParent (const Stmt *S) const
 
const StmtgetParentIgnoreParens (const Stmt *S) const
 
const StmtgetParentIgnoreParenCasts (const Stmt *S) const
 
bool hasParent (Stmt *S) const
 
bool isConsumedExpr (Expr *E) const
 
bool isConsumedExpr (const Expr *E) const
 

Detailed Description

Definition at line 21 of file ParentMap.h.

Constructor & Destructor Documentation

◆ ParentMap()

ParentMap::ParentMap ( Stmt ASTRoot)

Definition at line 98 of file ParentMap.cpp.

◆ ~ParentMap()

ParentMap::~ParentMap ( )

Definition at line 106 of file ParentMap.cpp.

Member Function Documentation

◆ addStmt()

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 110 of file ParentMap.cpp.

Referenced by clang::AnalysisDeclContext::getParentMap().

◆ getOuterParenParent()

Stmt * ParentMap::getOuterParenParent ( Stmt S) const

Definition at line 151 of file ParentMap.cpp.

◆ getParent() [1/2]

Stmt * ParentMap::getParent ( Stmt S) const

◆ getParent() [2/2]

const Stmt* clang::ParentMap::getParent ( const Stmt S) const
inline

Definition at line 43 of file ParentMap.h.

References getParent().

◆ getParentIgnoreParenCasts() [1/2]

Stmt * ParentMap::getParentIgnoreParenCasts ( Stmt S) const

◆ getParentIgnoreParenCasts() [2/2]

const Stmt* clang::ParentMap::getParentIgnoreParenCasts ( const Stmt S) const
inline

Definition at line 51 of file ParentMap.h.

References getParentIgnoreParenCasts().

◆ getParentIgnoreParenImpCasts()

Stmt * ParentMap::getParentIgnoreParenImpCasts ( Stmt S) const

Definition at line 143 of file ParentMap.cpp.

◆ getParentIgnoreParens() [1/2]

Stmt * ParentMap::getParentIgnoreParens ( Stmt S) const

Definition at line 129 of file ParentMap.cpp.

Referenced by getParentIgnoreParens(), and getStmtParent().

◆ getParentIgnoreParens() [2/2]

const Stmt* clang::ParentMap::getParentIgnoreParens ( const Stmt S) const
inline

Definition at line 47 of file ParentMap.h.

References getParentIgnoreParens().

◆ hasParent()

bool clang::ParentMap::hasParent ( Stmt S) const
inline

Definition at line 55 of file ParentMap.h.

References getParent(), and isConsumedExpr().

◆ isConsumedExpr() [1/2]

bool ParentMap::isConsumedExpr ( Expr E) const

◆ isConsumedExpr() [2/2]

bool clang::ParentMap::isConsumedExpr ( const Expr E) const
inline

Definition at line 61 of file ParentMap.h.

References isConsumedExpr().

◆ setParent()

void ParentMap::setParent ( const Stmt S,
const Stmt Parent 
)

Manually sets the parent of S to Parent.

If S is already in the map, this method will update the mapping.

Definition at line 116 of file ParentMap.cpp.

Referenced by addParentsForSyntheticStmts().


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