[cfe-commits] r163824 - in /cfe/trunk/lib/Sema: SemaDeclObjC.cpp SemaType.cpp

jahanian fjahanian at apple.com
Thu Sep 13 13:24:42 PDT 2012


On Sep 13, 2012, at 1:22 PM, John McCall wrote:

> On Sep 13, 2012, at 11:53 AM, Fariborz Jahanian wrote:
>> Author: fjahanian
>> Date: Thu Sep 13 13:53:14 2012
>> New Revision: 163824
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=163824&view=rev
>> Log:
>> Move back the stuff about missing ownership attribute warning
>> to SemaDeclObjC and apply some simplification per John's
>> comment. // rdar://12280826
>> 
>> Modified:
>>   cfe/trunk/lib/Sema/SemaDeclObjC.cpp
>>   cfe/trunk/lib/Sema/SemaType.cpp
>> 
>> Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=163824&r1=163823&r2=163824&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Thu Sep 13 13:53:14 2012
>> @@ -282,6 +282,28 @@
>>    AddFactoryMethodToGlobalPool(MDecl, true);
>> }
>> 
>> +/// HasExplicitOwnershipAttr - returns true when pointer to ObjC pointer
>> +/// has explicit ownership attribute; false otherwise.
>> +static bool
>> +HasExplicitOwnershipAttr(Sema &S, ParmVarDecl *Param) {
>> +  QualType T = Param->getType();
>> +  
>> +  if (!T->isPointerType() && !T->isReferenceType())
>> +    return true;
> 
> This is now redundant with the code following it:

Oh yes, I missed that.
- fariborz





More information about the cfe-commits mailing list