[cfe-dev] EvaluateAsLValue and non global storage
Douglas Gregor
dgregor at apple.com
Wed Aug 26 10:20:32 PDT 2009
On Aug 17, 2009, at 8:54 AM, Abramo Bagnara wrote:
> For an AST simplification application we'd need the exact same
> services
> of Expr::EvaluateAsLValue and other helper in ExprConstant.cpp but
> without current failure when DeclRefExpr has not global storage.
>
> There's a strong reason to abort the evaluation and to not instead
> return an LValue APValue with a non global storage base?
>
> This condition could be checked later from result value making the
> service given more general.
I was hoping that someone more familiar with the expression evaluator
logic would chime in (Eli? Anders?). However, as I see it,
EvaluateAsLValue could produce a value in this case but still returns
false and sets the diagnostic to something that indicates that the
storage is non-global.
- Doug
More information about the cfe-dev
mailing list