aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-28 17:50:39 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-28 17:50:39 +0000
commitf911242f43ae1b0a85c323631fe817df95c9cbe9 (patch)
tree03cd3e316b71ca61e1ba900de00367b40d8d07a9 /tools/libclang/IndexDecl.cpp
parent792db266f3d2f12a7a16bf37d90074f54bca1e6f (diff)
[AST] When we @synthesize a property with a user-defined ivar name,
make sure to record the source location of the ivar name. [libclang] When indexing @synthesized objc methods, report the @implementation as the lexical container. Fixes rdar://10905472 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/IndexDecl.cpp')
-rw-r--r--tools/libclang/IndexDecl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp
index 2bd71295e6..3f2c8b5710 100644
--- a/tools/libclang/IndexDecl.cpp
+++ b/tools/libclang/IndexDecl.cpp
@@ -216,11 +216,13 @@ public:
if (ObjCMethodDecl *MD = PD->getGetterMethodDecl()) {
if (MD->isSynthesized())
- IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation());
+ IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(),
+ D->getLexicalDeclContext());
}
if (ObjCMethodDecl *MD = PD->getSetterMethodDecl()) {
if (MD->isSynthesized())
- IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation());
+ IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(),
+ D->getLexicalDeclContext());
}
return true;
}