diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-28 17:50:39 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-28 17:50:39 +0000 |
commit | 346088067452f37a1c1d12a37698f53068e936b5 (patch) | |
tree | fef637c37e775da9f6ba597a3b8d6f54c7bc4e24 /clang/tools/libclang/IndexDecl.cpp | |
parent | 93db2923dab761c986a923ef86c5b002ec6b4397 (diff) | |
download | bcm5719-llvm-346088067452f37a1c1d12a37698f53068e936b5.tar.gz bcm5719-llvm-346088067452f37a1c1d12a37698f53068e936b5.zip |
[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
llvm-svn: 151635
Diffstat (limited to 'clang/tools/libclang/IndexDecl.cpp')
-rw-r--r-- | clang/tools/libclang/IndexDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/tools/libclang/IndexDecl.cpp b/clang/tools/libclang/IndexDecl.cpp index 2bd71295e6c..3f2c8b57101 100644 --- a/clang/tools/libclang/IndexDecl.cpp +++ b/clang/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; } |