diff options
Diffstat (limited to 'tools/libclang/CXIndexDataConsumer.cpp')
-rw-r--r-- | tools/libclang/CXIndexDataConsumer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/libclang/CXIndexDataConsumer.cpp b/tools/libclang/CXIndexDataConsumer.cpp index 616a0797f52b1..3dec36a5daebb 100644 --- a/tools/libclang/CXIndexDataConsumer.cpp +++ b/tools/libclang/CXIndexDataConsumer.cpp @@ -222,9 +222,11 @@ bool CXIndexDataConsumer::handleDeclOccurence( } bool CXIndexDataConsumer::handleModuleOccurence(const ImportDecl *ImportD, + const Module *Mod, SymbolRoleSet Roles, SourceLocation Loc) { - IndexingDeclVisitor(*this, SourceLocation(), nullptr).Visit(ImportD); + if (Roles & (SymbolRoleSet)SymbolRole::Declaration) + IndexingDeclVisitor(*this, SourceLocation(), nullptr).Visit(ImportD); return !shouldAbort(); } @@ -307,7 +309,7 @@ AttrListInfo::AttrListInfo(const Decl *D, CXIndexDataConsumer &IdxCtx) const IBOutletCollectionAttr * IBAttr = cast<IBOutletCollectionAttr>(IBInfo.A); SourceLocation InterfaceLocStart = - IBAttr->getInterfaceLoc()->getTypeLoc().getLocStart(); + IBAttr->getInterfaceLoc()->getTypeLoc().getBeginLoc(); IBInfo.IBCollInfo.attrInfo = &IBInfo; IBInfo.IBCollInfo.classLoc = IdxCtx.getIndexLoc(InterfaceLocStart); IBInfo.IBCollInfo.objcClass = nullptr; |