[cfe-commits] r140571 - in /cfe/trunk: lib/Sema/SemaObjCProperty.cpp test/SemaObjC/arc-setter-property-match.m
jahanian
fjahanian at apple.com
Mon Sep 26 16:01:25 PDT 2011
On Sep 26, 2011, at 3:31 PM, Eli Friedman wrote:
> On Mon, Sep 26, 2011 at 3:12 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>> Author: fjahanian
>> Date: Mon Sep 26 17:12:27 2011
>> New Revision: 140571
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=140571&view=rev
>> Log:
>> objc - in matching setter argument type to its property type,
>> ingore the type qualifiers. // rdar://10156674
>>
>> Added:
>> cfe/trunk/test/SemaObjC/arc-setter-property-match.m
>> Modified:
>> cfe/trunk/lib/Sema/SemaObjCProperty.cpp
>>
>> Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=140571&r1=140570&r2=140571&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Mon Sep 26 17:12:27 2011
>> @@ -1481,7 +1481,8 @@
>> Context.VoidTy)
>> Diag(SetterMethod->getLocation(), diag::err_setter_type_void);
>> if (SetterMethod->param_size() != 1 ||
>> - ((*SetterMethod->param_begin())->getType() != property->getType())) {
>> + ((*SetterMethod->param_begin())->getType().getUnqualifiedType()
>> + != property->getType().getUnqualifiedType())) {
>> Diag(property->getLocation(),
>> diag::warn_accessor_property_type_mismatch)
>> << property->getDeclName()
>
> ASTContext::hasSameUnqualifiedType might be useful here.
Yes it is. In r140576.
- Thanks, Fariborz
>
> -Eli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110926/91d738e2/attachment.html>
More information about the cfe-commits
mailing list