On Dec 3, 2010, at 10:47 PM, Abramo Bagnara wrote:
> Il 04/12/2010 07:42, John McCall ha scritto:
>>
>> On Dec 3, 2010, at 10:37 PM, Abramo Bagnara wrote:
>>
>>> Il 04/12/2010 04:47, John McCall ha scritto:
>>>> --- cfe/trunk/lib/AST/Expr.cpp (original)
>>>> +++ cfe/trunk/lib/AST/Expr.cpp Fri Dec 3 21:47:34 2010
>>>> @@ -824,6 +824,8 @@
>>>> return "LValueBitCast";
>>>> case CK_LValueToRValue:
>>>> return "LValueToRValue";
>>>> + case CK_GetObjCProperty:
>>>> + return "GetObjCProperty";
>>>> case CK_NoOp:
>>>> return "NoOp";
>>>> case CK_BaseToDerived:
>>>> @@ -1722,6 +1724,24 @@
>>>> }
>>>> }
>>>>
>>>> +Expr *Expr::IgnoreParenLValueCasts() {
>>>> + Expr *E = this;
>>>> + while (E) {
>>>> + if (ParenExpr *P = dyn_cast<ParenExpr>(E)) {
>>>> + E = P->getSubExpr();
>>>> + continue;
>>>> + }
>>>> + if (CastExpr *P = dyn_cast<CastExpr>(E)) {
>>>> + if (P->getCastKind() == CK_LValueToRValue) {
>>>> + E = P->getSubExpr();
>>>> + continue;
>>>> + }
>>>> + }
>>>> + break;
>>>> + }
>>>> + return E;
>>>> +}
>>>
>>> What about __extension__ skipping?
>>
>> Good point. I *think* we don't need that here because this method is meant
>> to just be a hack to simplify workarounds in the static analyzer, but Ted
>> might have thoughts. For one, I don't know whether the analyzer generally
>> pays attention to __extension__ nodes.
>
> Whenever it calls IgnoreParen* helpers it *does* pay attention: they are
> always skipped.
In that case, I'll add __extension__ skipping, thanks.
John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits