aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/DeclReferenceMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Index/DeclReferenceMap.cpp')
-rw-r--r--lib/Index/DeclReferenceMap.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Index/DeclReferenceMap.cpp b/lib/Index/DeclReferenceMap.cpp
index 0aee2a40ec..0e48a369d5 100644
--- a/lib/Index/DeclReferenceMap.cpp
+++ b/lib/Index/DeclReferenceMap.cpp
@@ -30,6 +30,9 @@ public:
void VisitDeclRefExpr(DeclRefExpr *Node);
void VisitMemberExpr(MemberExpr *Node);
void VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node);
+
+ void VisitTypedefLoc(TypedefLoc TL);
+ void VisitObjCInterfaceLoc(ObjCInterfaceLoc TL);
};
} // anonymous namespace
@@ -52,6 +55,16 @@ void RefMapper::VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node) {
Map.insert(std::make_pair(Node->getDecl(), ASTLocation(CurrentDecl, Node)));
}
+void RefMapper::VisitTypedefLoc(TypedefLoc TL) {
+ NamedDecl *ND = TL.getTypedefDecl();
+ Map.insert(std::make_pair(ND, ASTLocation(CurrentDecl, ND, TL.getNameLoc())));
+}
+
+void RefMapper::VisitObjCInterfaceLoc(ObjCInterfaceLoc TL) {
+ NamedDecl *ND = TL.getIFaceDecl();
+ Map.insert(std::make_pair(ND, ASTLocation(CurrentDecl, ND, TL.getNameLoc())));
+}
+
//===----------------------------------------------------------------------===//
// DeclReferenceMap Implementation
//===----------------------------------------------------------------------===//