diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-15 00:04:56 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-15 00:04:56 +0000 |
commit | 41cfce25fef3ccdb68849ef9c28403d7b9c5806f (patch) | |
tree | 24b3880325265da244e6326d3421ba21116dc0fd /clang/tools/libclang/IndexingContext.cpp | |
parent | dc785db0c3112e544aa42c571f91f05046d3c2cf (diff) | |
download | bcm5719-llvm-41cfce25fef3ccdb68849ef9c28403d7b9c5806f.tar.gz bcm5719-llvm-41cfce25fef3ccdb68849ef9c28403d7b9c5806f.zip |
[libclang] Suppress indexing references for occurrences of the interface
in a superclass and the protocols in a protocol list.
llvm-svn: 146615
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r-- | clang/tools/libclang/IndexingContext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); |