[cfe-dev] PATCH: Overloaded function declarations in C++
doug.gregor at gmail.com
Wed Sep 10 21:51:03 PDT 2008
On Mon, Sep 8, 2008 at 9:10 PM, Doug Gregor <doug.gregor at gmail.com> wrote:
> On Tue, Sep 9, 2008 at 4:36 AM, Argiris Kirtzidis <akyrtzi at gmail.com> wrote:
>> Is OverloadedFunctionDecl ever going to be used as a ValueDecl ?
>> If not, we can make it more compact as a NamedDecl, and use a specialized
>> OverloadRefExpr(OverloadedFunctionDecl) for expressions. (or make
>> DeclRefExpr accept a NamedDecl).
> I can't think of anywhere that we would need an OverloadedFunctionDecl
> to be a ValueDecl, except to satisfy DeclRefExpr.
> I like the idea of making DeclRefExpr only require a NamedDecl. It
> allows OverloadedFunctionDecl to shrink considerably, and shouldn't
> affect DeclRefExpr at all. Sema::ActOnIdentifierExpr will need a
> slight tweak to fill in the OverloadType for OverloadedFunctionDecls,
> but that's trivial. Good idea!
This worked out, although there were quite a few places that depended
on DeclRefExpr requiring a ValueDecl. I've patched all those up;
updated patch attached. It's a bit too big to commit without approval
from one of the Apple guys.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 40452 bytes
Desc: not available
More information about the cfe-dev