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
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 046b187..409219a 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -413,7 +413,16 @@
   if (!RC) {
     if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {
       SmallVector<const NamedDecl*, 8> Overridden;
-      if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D))
+      const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D);
+      if (OMD && OMD->isPropertyAccessor()) {
+        if (const ObjCPropertyDecl *PDecl = OMD->findPropertyDecl()) {
+          if (comments::FullComment *FC = getCommentForDecl(PDecl, PP)) {
+            comments::FullComment *CFC = cloneFullComment(FC, D);
+            return CFC;
+          }
+        }
+      }
+      if (OMD)
         addRedeclaredMethods(OMD, Overridden);
       getOverriddenMethods(dyn_cast<NamedDecl>(D), Overridden);
       for (unsigned i = 0, e = Overridden.size(); i < e; i++) {