diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /tools/libclang/CXIndexDataConsumer.cpp | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
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; |