[cfe-commits] r133525 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaCXXCast.cpp lib/Sema/SemaExprObjC.cpp test/CodeGenObjC/arc-unbridged-cast.m

John McCall rjmccall at apple.com
Tue Jun 21 11:22:21 PDT 2011


On Jun 21, 2011, at 11:19 AM, jahanian wrote:
> On Jun 21, 2011, at 11:16 AM, John McCall wrote:
>> On Jun 21, 2011, at 10:38 AM, Fariborz Jahanian wrote:
>>> Modified: cfe/trunk/lib/Sema/SemaCXXCast.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXCast.cpp?rev=133525&r1=133524&r2=133525&view=diff
>>> ==============================================================================
>>> --- cfe/trunk/lib/Sema/SemaCXXCast.cpp (original)
>>> +++ cfe/trunk/lib/Sema/SemaCXXCast.cpp Tue Jun 21 12:38:29 2011
>>> @@ -641,8 +641,9 @@
>>>     diagnoseBadCast(Self, msg, CT_Reinterpret, OpRange, SrcExpr.get(), DestType);
>>>   }
>>> } else if (tcr == TC_Success && Self.getLangOptions().ObjCAutoRefCount) {
>>> +    Expr *Exp = SrcExpr.get();
>>>   Self.CheckObjCARCConversion(OpRange, DestType,
>>> -                                SrcExpr.get(), Sema::CCK_OtherCast);
>>> +                                Exp, Sema::CCK_OtherCast);
>>> }
>>> }
>>> 
>>> @@ -704,9 +705,11 @@
>>> } else if (tcr == TC_Success) {
>>>   if (Kind == CK_BitCast)
>>>     Self.CheckCastAlign(SrcExpr.get(), DestType, OpRange);
>>> -    if (Self.getLangOptions().ObjCAutoRefCount)
>>> +    if (Self.getLangOptions().ObjCAutoRefCount) {
>>> +      Expr *Exp = SrcExpr.get();
>>>     Self.CheckObjCARCConversion(OpRange, DestType,
>>> -                                  SrcExpr.get(), Sema::CCK_OtherCast);
>>> +                                  Exp, Sema::CCK_OtherCast);
>>> +    }
>>> }
>> 
>> Any changes to 'Exp' here are being dropped on the floor.
>> Is that intentional?
> 
> Does not happen. Exp changes only for CStyle_Cast.

Ah, okay.  Could you add a comment to that effect?

John.



More information about the cfe-commits mailing list