[cfe-dev] PATCH: Overloaded function declarations in C++

Doug Gregor 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.

  - Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-overloaded-function-decls-2.patch
Type: application/octet-stream
Size: 40452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080911/5aac4453/attachment.obj>

More information about the cfe-dev mailing list