summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-06 23:12:49 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-06 23:12:49 +0000
commit06d0dd641b2e884cca53e0f93d3e0fa881476380 (patch)
tree1ff113c10bae78eb9f21b57b067954c8e3acddcf /clang/lib/Sema/SemaDeclObjC.cpp
parentd2c2ad515e33ebf700942e90cddb4b72cc738d70 (diff)
downloadbcm5719-llvm-06d0dd641b2e884cca53e0f93d3e0fa881476380.tar.gz
bcm5719-llvm-06d0dd641b2e884cca53e0f93d3e0fa881476380.zip
Setters returning a typedef of 'void' should not cause error.
Bug reported by Chris L. llvm-svn: 60635
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 54934425806..d7b71211d49 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/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())) {
OpenPOWER on IntegriCloud