[cfe-commits] r75593 - /cfe/trunk/lib/Index/DeclReferenceMap.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Mon Jul 13 20:18:10 PDT 2009
Author: akirtzidis
Date: Mon Jul 13 22:18:09 2009
New Revision: 75593
URL: http://llvm.org/viewvc/llvm-project?rev=75593&view=rev
Log:
In DeclReferenceMap, map FieldDecls to the MemberExprs that reference them.
Modified:
cfe/trunk/lib/Index/DeclReferenceMap.cpp
Modified: cfe/trunk/lib/Index/DeclReferenceMap.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/DeclReferenceMap.cpp?rev=75593&r1=75592&r2=75593&view=diff
==============================================================================
--- cfe/trunk/lib/Index/DeclReferenceMap.cpp (original)
+++ cfe/trunk/lib/Index/DeclReferenceMap.cpp Mon Jul 13 22:18:09 2009
@@ -34,6 +34,7 @@
void VisitDeclStmt(DeclStmt *Node);
void VisitDeclRefExpr(DeclRefExpr *Node);
+ void VisitMemberExpr(MemberExpr *Node);
void VisitStmt(Stmt *Node);
};
@@ -69,6 +70,11 @@
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)
More information about the cfe-commits
mailing list