diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-15 19:19:03 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-15 19:19:03 +0000 |
commit | 47b21081cbb31df8f1fb1fa9a9efc29f0d14ab01 (patch) | |
tree | b3d14736a370854b7ff47d6fefc71b6ea18fa85d /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 24645c9ff43113ace1d3ac6b4a72cf038319e34c (diff) | |
download | bcm5719-llvm-47b21081cbb31df8f1fb1fa9a9efc29f0d14ab01.tar.gz bcm5719-llvm-47b21081cbb31df8f1fb1fa9a9efc29f0d14ab01.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
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 |