[cfe-commits] r150048 - /cfe/trunk/tools/libclang/IndexingContext.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Feb 7 19:04:33 PST 2012
Author: akirtzidis
Date: Tue Feb 7 21:04:33 2012
New Revision: 150048
URL: http://llvm.org/viewvc/llvm-project?rev=150048&view=rev
Log:
[libclang] Indexing: When suppressing references, suppress references
of bases in C++ classes. rdar://10768707
Modified:
cfe/trunk/tools/libclang/IndexingContext.cpp
Modified: cfe/trunk/tools/libclang/IndexingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/IndexingContext.cpp?rev=150048&r1=150047&r2=150048&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/IndexingContext.cpp (original)
+++ cfe/trunk/tools/libclang/IndexingContext.cpp Tue Feb 7 21:04:33 2012
@@ -646,6 +646,19 @@
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);
}
More information about the cfe-commits
mailing list