[cfe-dev] [PATCH] Function redeclaration and PR2360

Eli Friedman eli.friedman at gmail.com
Tue May 27 09:44:09 PDT 2008

On Tue, May 27, 2008 at 9:17 AM, Argiris Kirtzidis <akyrtzi at gmail.com> wrote:
> Do you guys disagree with the suggestion here ? :
> http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html
> I was going to implement that one. The result will be that DeclRefExprs that
> refer to the same function will always refer to the same FunctionDecl as
> well.

Mmm... the issue with that exact approach is that we lose information:
once the AST is completely constructed, you can't tell which
declaration a DeclRef refers to.  Usually, it doesn't really matter;
however, a rewriting tool might be interested in knowing which
declaration is referred to, and we'd have funny cases where the type
of the DeclRef and the type of the Decl itself are different.  Still
might be workable, though.


More information about the cfe-dev mailing list