Check for correct'void' return type for setter methods.

llvm-svn: 60629
This commit is contained in:
Fariborz Jahanian 2008-12-06 21:11:37 +00:00
parent 5df391e5c7
commit 8707e322cc

View File

@ -940,7 +940,7 @@ Sema::diagnosePropertySetterGetterMismatch(ObjCPropertyDecl *property,
<< GetterMethod->getSelector().getAsIdentifierInfo();
if (SetterMethod) {
if (SetterMethod->getResultType() != Context.VoidPtrTy)
if (SetterMethod->getResultType() != Context.VoidTy)
Diag(SetterMethod->getLocation(), diag::err_setter_type_void);
if (SetterMethod->getNumParams() != 1 ||
(SetterMethod->getParamDecl(0)->getType() != property->getType()))