diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-02-09 19:07:19 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-02-09 19:07:19 +0000 |
commit | a4cffec19e89557843e162f84b1345590e6dae9f (patch) | |
tree | 3a19a5b1f4406485a29dc568ae051c4f81d8974a /clang/tools/libclang/IndexingContext.cpp | |
parent | 4c3131d6ebf74a176e10ae51d270e8fae0b01854 (diff) | |
download | bcm5719-llvm-a4cffec19e89557843e162f84b1345590e6dae9f.tar.gz bcm5719-llvm-a4cffec19e89557843e162f84b1345590e6dae9f.zip |
[libclang] indexing: for a synthesized property reference have the parent be the ObjC implementation decl.
llvm-svn: 260253
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-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, |