diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-06 23:12:49 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-06 23:12:49 +0000 |
commit | 5dd412901196305e7c6dd053880f711ca5419763 (patch) | |
tree | c3c7d768ada6e42e94bbe08578a9ac3646f1592d | |
parent | 1ac2bc44781ec8451f880dcf586768a71824d3a6 (diff) |
Setters returning a typedef of 'void' should not cause error.
Bug reported by Chris L.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60635 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 5493442580..d7b71211d4 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -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())) { |