From 91b51a92f2e9fc8025b6a9df88442840eb62823a Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 9 Dec 2008 22:43:22 +0000 Subject: Prevent bogus warning on unimplemented setter/getter when user has added declaration of these methods in its @interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60803 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/DeclObjC.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/AST/DeclObjC.cpp') diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 1b098b5f89..84f0d98bf2 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -456,6 +456,10 @@ addPropertyMethods(Decl *D, insMethods.push_back(GetterDecl); InsMap[property->getGetterName()] = GetterDecl; } + else + // A user declared getter will be synthesize when @synthesize of + // the property with the same name is seen in the @implementation + GetterDecl->setIsSynthesized(); property->setGetterMethodDecl(GetterDecl); // Skip setter if property is read-only. @@ -487,6 +491,10 @@ addPropertyMethods(Decl *D, 0, 0); SetterDecl->setMethodParams(&Argument, 1); } + else + // A user declared setter will be synthesize when @synthesize of + // the property with the same name is seen in the @implementation + SetterDecl->setIsSynthesized(); property->setSetterMethodDecl(SetterDecl); } -- cgit v1.2.3-18-g5258