From 47b21081cbb31df8f1fb1fa9a9efc29f0d14ab01 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 15 Apr 2009 19:19:03 +0000 Subject: Patch to remove a bogus warning which pointed to underlying AST gen. issue for property in continuation class declared readwrite but which did not generate the declaration for the setter. Fix also removed a FIXME and resulted in code cleanup. llvm-svn: 69200 --- clang/lib/Sema/SemaDeclObjC.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'clang/lib/Sema/SemaDeclObjC.cpp') diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 464c78a5df1..208562f8f12 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -1672,24 +1672,14 @@ Sema::DeclPtrTy Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, if (Attributes & ObjCDeclSpec::DQ_PR_copy) PIDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_copy); PIDecl->setSetterName(SetterSel); - // FIXME: use a common routine with addPropertyMethods. - ObjCMethodDecl *SetterDecl = - ObjCMethodDecl::Create(Context, AtLoc, AtLoc, SetterSel, - Context.VoidTy, - CCPrimary, - true, false, true, - ObjCMethodDecl::Required); - ParmVarDecl *Argument = ParmVarDecl::Create(Context, SetterDecl, - FD.D.getIdentifierLoc(), - PropertyId, - T, VarDecl::None, 0); - SetterDecl->setMethodParams(&Argument, 1, Context); - PIDecl->setSetterMethodDecl(SetterDecl); } else Diag(AtLoc, diag::err_use_continuation_class) << CCPrimary->getDeclName(); *isOverridingProperty = true; + // Make sure setter decl is synthesized, and added to primary + // class's list. + ProcessPropertyDecl(PIDecl, CCPrimary); return DeclPtrTy(); } // No matching property found in the primary class. Just fall thru -- cgit v1.2.3