Support for implementation of property in the case where
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 85b8ec1..1b098b5 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -220,13 +220,14 @@
 // Objective-C Decl Implementation
 //===----------------------------------------------------------------------===//
 
-void ObjCMethodDecl::createImplicitParams(ASTContext &Context) {
+void ObjCMethodDecl::createImplicitParams(ASTContext &Context, 
+                                          const ObjCInterfaceDecl *OID) {
   QualType selfTy;
   if (isInstance()) {
     // There may be no interface context due to error in declaration
     // of the interface (which has been reported). Recover gracefully.
-    if (ObjCInterfaceDecl *OID = getClassInterface()) {
-      selfTy = Context.getObjCInterfaceType(OID);
+    if (OID) {
+      selfTy = Context.getObjCInterfaceType(const_cast<ObjCInterfaceDecl *>(OID));
       selfTy = Context.getPointerType(selfTy);
     } else {
       selfTy = Context.getObjCIdType();