]> granicus.if.org Git - clang/commitdiff
Setters returning a typedef of 'void' should not cause error.
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 6 Dec 2008 23:12:49 +0000 (23:12 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 6 Dec 2008 23:12:49 +0000 (23:12 +0000)
Bug reported by Chris L.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60635 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp

index 54934425806ed0174a7f931a1fb4b35366c3ce08..d7b71211d49d9ba897f8e71ccca1da17e193072f 100644 (file)
@@ -992,7 +992,8 @@ Sema::diagnosePropertySetterGetterMismatch(ObjCPropertyDecl *property,
   }
   
   if (SetterMethod) {
-    if (SetterMethod->getResultType() != Context.VoidTy)
+    if (Context.getCanonicalType(SetterMethod->getResultType()) 
+        != Context.VoidTy)
       Diag(SetterMethod->getLocation(), diag::err_setter_type_void);
     if (SetterMethod->getNumParams() != 1 ||
         (SetterMethod->getParamDecl(0)->getType() != property->getType())) {