forked from OSchip/llvm-project
[libclang] Indexing: When suppressing references, suppress references
of bases in C++ classes. rdar://10768707 llvm-svn: 150048
This commit is contained in:
parent
0ee8c513f7
commit
95c0feb5e0
|
@ -646,6 +646,19 @@ bool IndexingContext::handleCXXRecordDecl(const CXXRecordDecl *RD,
|
|||
CXXDInfo.CXXClassInfo.bases = BaseList.getBases();
|
||||
CXXDInfo.CXXClassInfo.numBases = BaseList.getNumBases();
|
||||
|
||||
if (suppressRefs()) {
|
||||
// Go through bases and mark them as referenced.
|
||||
for (unsigned i = 0, e = BaseList.getNumBases(); i != e; ++i) {
|
||||
const CXIdxBaseClassInfo *baseInfo = BaseList.getBases()[i];
|
||||
if (baseInfo->base) {
|
||||
const NamedDecl *BaseD = BaseList.BaseEntities[i].Dcl;
|
||||
SourceLocation
|
||||
Loc = SourceLocation::getFromRawEncoding(baseInfo->loc.int_data);
|
||||
markEntityOccurrenceInFile(BaseD, Loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return handleDecl(OrigD, OrigD->getLocation(), getCursor(OrigD), CXXDInfo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue