From 66ea6c1fd5e41e17be1b5c90f938721a8e8f9c63 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 9 Feb 2016 19:07:19 +0000 Subject: [PATCH] [libclang] indexing: for a synthesized property reference have the parent be the ObjC implementation decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260253 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/libclang/IndexingContext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp index 5d944bae1c..7f65412f98 100644 --- a/tools/libclang/IndexingContext.cpp +++ b/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(DC), DC); } bool IndexingContext::handleSynthesizedObjCMethod(const ObjCMethodDecl *D, -- 2.40.0