mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 03:06:07 +00:00
Check for correct'void' return type for setter methods.
llvm-svn: 60629
This commit is contained in:
parent
5df391e5c7
commit
8707e322cc
@ -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()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user