Synthesized getter/setter method declarations need not have
an implementation. This fixes couple of failing prperty tests
caused by my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50830 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 3c89a6a..cda73d2 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -26,12 +26,13 @@
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 @@
property->getLocation(),
property->getGetterName(), resultDeclType,
this, 0,
- true, false, ObjCMethodDecl::Required);
+ true, false, true, ObjCMethodDecl::Required);
property->setGetterMethodDecl(ObjCMethod);
insMethods.push_back(ObjCMethod);
}