[cfe-commits] r88901 - in /cfe/trunk/lib/CodeGen: CGCXXExpr.cpp CGExpr.cpp CGExprScalar.cpp CodeGenFunction.h

Sean Hunt rideau3 at gmail.com
Sun Nov 15 23:06:03 PST 2009


Mike Stump wrote:
> +/// EmitCastLValue - Casts are never lvalues unless that cast is a dynamic_cast.
> +/// If the cast is a dynamic_cast, we can have the usual lvalue result,
> +/// otherwise if a cast is needed by the code generator in an lvalue context,
> +/// then it must mean that we need the address of an aggregate in order to
> +/// access one of its fields.  This can happen for all the reasons that casts
> +/// are permitted with aggregate result, including noop aggregate casts, and
> +/// cast from scalar to union.

I'll admit I'm not very familiar with this part of the code, but aren't 
casts to reference types also lvalues?

Sean



More information about the cfe-commits mailing list