aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/DeclObjC.cpp5
-rw-r--r--lib/Sema/SemaDeclObjC.cpp3
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 3c89a6aa7d..cda73d2ff9 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -26,12 +26,13 @@ ObjCMethodDecl *ObjCMethodDecl::Create(ASTContext &C,
Decl *contextDecl,
AttributeList *M, bool isInstance,
bool isVariadic,
+ bool isSynthesized,
ImplementationControl impControl) {
void *Mem = C.getAllocator().Allocate<ObjCMethodDecl>();
return new (Mem) ObjCMethodDecl(beginLoc, endLoc,
SelInfo, T, contextDecl,
M, isInstance,
- isVariadic, impControl);
+ isVariadic, isSynthesized, impControl);
}
ObjCInterfaceDecl *ObjCInterfaceDecl::Create(ASTContext &C,
@@ -294,7 +295,7 @@ void ObjCInterfaceDecl::addPropertyMethods(
property->getLocation(),
property->getGetterName(), resultDeclType,
this, 0,
- true, false, ObjCMethodDecl::Required);
+ true, false, true, ObjCMethodDecl::Required);
property->setGetterMethodDecl(ObjCMethod);
insMethods.push_back(ObjCMethod);
}
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 96710cc20c..a0fa6ecb2b 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -636,7 +636,7 @@ void Sema::ImplMethodsVsClassMethods(ObjCImplementationDecl* IMPDecl,
bool IncompleteImpl = false;
for (ObjCInterfaceDecl::instmeth_iterator I = IDecl->instmeth_begin(),
E = IDecl->instmeth_end(); I != E; ++I)
- if (!InsMap.count((*I)->getSelector()))
+ if (!(*I)->isSynthesized() && !InsMap.count((*I)->getSelector()))
WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl);
llvm::DenseSet<Selector> ClsMap;
@@ -964,6 +964,7 @@ Sema::DeclTy *Sema::ActOnMethodDeclaration(
ObjCMethodDecl::Create(Context, MethodLoc, EndLoc, Sel, resultDeclType,
ClassDecl, AttrList,
MethodType == tok::minus, isVariadic,
+ false,
MethodDeclKind == tok::objc_optional ?
ObjCMethodDecl::Optional :
ObjCMethodDecl::Required);