]> granicus.if.org Git - clang/commitdiff
Check for correct'void' return type for setter methods.
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 6 Dec 2008 21:11:37 +0000 (21:11 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 6 Dec 2008 21:11:37 +0000 (21:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60629 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp

index 636a71d9a4b4e18e7ddae3d900d50a4f5b905af0..83013a7de3ba0c9650a5707afad1fbc3b47c4b9a 100644 (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()))