r260253 - [libclang] indexing: for a synthesized property reference have the parent be the ObjC implementation decl.
Argyrios Kyrtzidis via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 9 11:07:19 PST 2016
Author: akirtzidis
Date: Tue Feb 9 13:07:19 2016
New Revision: 260253
URL: http://llvm.org/viewvc/llvm-project?rev=260253&view=rev
Log:
[libclang] indexing: for a synthesized property reference have the parent be the ObjC implementation decl.
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=260253&r1=260252&r2=260253&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/IndexingContext.cpp (original)
+++ cfe/trunk/tools/libclang/IndexingContext.cpp Tue Feb 9 13:07:19 2016
@@ -592,8 +592,9 @@ bool IndexingContext::handleObjCMethod(c
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,
More information about the cfe-commits
mailing list