From 3d8552a75d03dd1981939134a17b3918c28dc762 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 9 Dec 2008 20:23:04 +0000 Subject: 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. llvm-svn: 60792 --- clang/lib/AST/DeclObjC.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/lib/AST/DeclObjC.cpp') diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index 85b8ec14e04..1b098b5f894 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -220,13 +220,14 @@ ObjCPropertyDecl *ObjCPropertyDecl::Create(ASTContext &C, // 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(OID)); selfTy = Context.getPointerType(selfTy); } else { selfTy = Context.getObjCIdType(); -- cgit v1.2.3