[cfe-dev] Fixes for References
Bill Wendling
isanbard at gmail.com
Mon Jul 16 16:02:23 PDT 2007
On 7/16/07, Chris Lattner <clattner at apple.com> wrote:
> Nice, now we're getting there :)
>
> > + if (const ReferenceType *ref = dyn_cast<ReferenceType>
> > (t.getCanonicalType()))
> > + t = promoteExprToType(e, ref->getReferenceeType()); // C++ 5p6
>
> Plz use a textual spec citation instead of a numeric one [foo.bar].
> Other than that, it looks ok, please commit.
>
Okay.
> It would be nice to refactor the code so that UsualUnaryConversions
> only needs to check for references once, but I'm not sure if that is
> possible.
>
> As a follow on patch, please eliminate the call to getCanonicalType
> by enhancing the Type::isReferenceType() predicate to return the
> reference type (like we now do for pointer type). This will allow
> you to retain the typedef info for reference typedefs.
>
I'll submit tonight. Thanks! :-)
-bw
More information about the cfe-dev
mailing list