[libclang] Suppress indexing references for occurrences of the interface
in a superclass and the protocols in a protocol list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146615 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp
index a2480ba..8d27d85 100644
--- a/tools/libclang/IndexingContext.cpp
+++ b/tools/libclang/IndexingContext.cpp
@@ -34,6 +34,9 @@
                                 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 @@
     BaseClass.base = &BaseEntity;
     BaseClass.cursor = MakeCursorObjCSuperClassRef(SuperD, SuperLoc, CXTU);
     BaseClass.loc = getIndexLoc(SuperLoc);
+
+    if (suppressRefs())
+      markEntityOccurrenceInFile(SuperD, SuperLoc);
   }
   
   ObjCProtocolListInfo ProtInfo(D->getReferencedProtocols(), *this, SA);