forked from OSchip/llvm-project
In DeclReferenceMap, map FieldDecls to the MemberExprs that reference them.
llvm-svn: 75593
This commit is contained in:
parent
664b690107
commit
a28d145cbb
|
@ -34,6 +34,7 @@ public:
|
|||
|
||||
void VisitDeclStmt(DeclStmt *Node);
|
||||
void VisitDeclRefExpr(DeclRefExpr *Node);
|
||||
void VisitMemberExpr(MemberExpr *Node);
|
||||
void VisitStmt(Stmt *Node);
|
||||
};
|
||||
|
||||
|
@ -69,6 +70,11 @@ void StmtMapper::VisitDeclRefExpr(DeclRefExpr *Node) {
|
|||
Map.insert(std::make_pair(PrimD, ASTLocation(Parent, Node)));
|
||||
}
|
||||
|
||||
void StmtMapper::VisitMemberExpr(MemberExpr *Node) {
|
||||
NamedDecl *PrimD = cast<NamedDecl>(Node->getMemberDecl()->getPrimaryDecl());
|
||||
Map.insert(std::make_pair(PrimD, ASTLocation(Parent, Node)));
|
||||
}
|
||||
|
||||
void StmtMapper::VisitStmt(Stmt *Node) {
|
||||
for (Stmt::child_iterator
|
||||
I = Node->child_begin(), E = Node->child_end(); I != E; ++I)
|
||||
|
|
Loading…
Reference in New Issue