diff options
-rw-r--r-- | clang/tools/libclang/IndexingContext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index 5d944bae1cb..7f65412f989 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/tools/libclang/IndexingContext.cpp @@ -592,8 +592,9 @@ bool IndexingContext::handleObjCMethod(const ObjCMethodDecl *D) { bool IndexingContext::handleSynthesizedObjCProperty( const ObjCPropertyImplDecl *D) { ObjCPropertyDecl *PD = D->getPropertyDecl(); - return handleReference(PD, D->getLocation(), getCursor(D), nullptr, - D->getDeclContext()); + auto *DC = D->getDeclContext(); + return handleReference(PD, D->getLocation(), getCursor(D), + dyn_cast<NamedDecl>(DC), DC); } bool IndexingContext::handleSynthesizedObjCMethod(const ObjCMethodDecl *D, |