]> granicus.if.org Git - clang/commitdiff
objc - compare setter/property types using
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 26 Sep 2011 22:59:09 +0000 (22:59 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 26 Sep 2011 22:59:09 +0000 (22:59 +0000)
hasSameUnqualifiedType in //rdar://10156674

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

lib/Sema/SemaObjCProperty.cpp

index 9297bc23c63353ada74e511a73e39fc1c4b19f38..db23c84f2e20c8e9683e798e6fcb4cb7732bdfb3 100644 (file)
@@ -1481,8 +1481,8 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property,
           Context.VoidTy)
       Diag(SetterMethod->getLocation(), diag::err_setter_type_void);
     if (SetterMethod->param_size() != 1 ||
-        ((*SetterMethod->param_begin())->getType().getUnqualifiedType() 
-         != property->getType().getUnqualifiedType())) {
+        !Context.hasSameUnqualifiedType(
+          (*SetterMethod->param_begin())->getType(), property->getType())) {
       Diag(property->getLocation(),
            diag::warn_accessor_property_type_mismatch)
         << property->getDeclName()