From 41cfce25fef3ccdb68849ef9c28403d7b9c5806f Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 15 Dec 2011 00:04:56 +0000 Subject: [libclang] Suppress indexing references for occurrences of the interface in a superclass and the protocols in a protocol list. llvm-svn: 146615 --- clang/tools/libclang/IndexingContext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/tools/libclang/IndexingContext.cpp') diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index a2480ba092c..8d27d85a55d 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/tools/libclang/IndexingContext.cpp @@ -34,6 +34,9 @@ IndexingContext::ObjCProtocolListInfo::ObjCProtocolListInfo( MakeCursorObjCProtocolRef(PD, Loc, IdxCtx.CXTU), IdxCtx.getIndexLoc(Loc) }; ProtInfos.push_back(ProtInfo); + + if (IdxCtx.suppressRefs()) + IdxCtx.markEntityOccurrenceInFile(PD, Loc); } for (unsigned i = 0, e = ProtInfos.size(); i != e; ++i) @@ -328,6 +331,9 @@ bool IndexingContext::handleObjCInterface(const ObjCInterfaceDecl *D) { BaseClass.base = &BaseEntity; BaseClass.cursor = MakeCursorObjCSuperClassRef(SuperD, SuperLoc, CXTU); BaseClass.loc = getIndexLoc(SuperLoc); + + if (suppressRefs()) + markEntityOccurrenceInFile(SuperD, SuperLoc); } ObjCProtocolListInfo ProtInfo(D->getReferencedProtocols(), *this, SA); -- cgit v1.2.3