[cfe-commits] r60635 - /cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Fariborz Jahanian fjahanian at apple.com
Sat Dec 6 15:12:52 PST 2008


Author: fjahanian
Date: Sat Dec  6 17:12:49 2008
New Revision: 60635

URL: http://llvm.org/viewvc/llvm-project?rev=60635&view=rev
Log:
Setters returning a typedef of 'void' should not cause error.
Bug reported by Chris L.

Modified:
    cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=60635&r1=60634&r2=60635&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Sat Dec  6 17:12:49 2008
@@ -992,7 +992,8 @@
   }
   
   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())) {





More information about the cfe-commits mailing list