summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-12 00:28:34 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-12 00:28:34 +0000
commit37494a176c8bfe274375c1deef124c149ba28150 (patch)
tree82d856b4af3df2238b4bef06f2d2dd1acc2081e0 /clang/lib/AST/DeclObjC.cpp
parent03872a3a2ef6a3a64e05ba31fda5a57ab28246dd (diff)
downloadbcm5719-llvm-37494a176c8bfe274375c1deef124c149ba28150.tar.gz
bcm5719-llvm-37494a176c8bfe274375c1deef124c149ba28150.zip
comment parsing: when property accessors don't have comment
of their own (or are syntheszed), use prperty's comment. for them. // rdar://12791315 llvm-svn: 172278
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 32503ad7857..816c43200a8 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -947,6 +947,11 @@ ObjCMethodDecl::findPropertyDecl(bool CheckOverrides) const {
if (isPropertyAccessor()) {
const ObjCContainerDecl *Container = cast<ObjCContainerDecl>(getParent());
+ // If container is class extension, find its primary class.
+ if (const ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(Container))
+ if (CatDecl->IsClassExtension())
+ Container = CatDecl->getClassInterface();
+
bool IsGetter = (NumArgs == 0);
for (ObjCContainerDecl::prop_iterator I = Container->prop_begin(),
OpenPOWER on IntegriCloud