[cfe-dev] Identifiying (successfully resolved) overloaded function references.

Enea Zaffanella zaffanella at cs.unipr.it
Fri Sep 30 02:19:47 PDT 2011


Hello.

We would like to identify the DeclRefExpr and MemberExpr AST nodes
that have been created by looking up an overloaded function reference.
As far as we can tell, there is no way to extract this information
from the current AST. (Is such an impression correct?)

Hence, we would add a Boolean bitfield flag to AST nodes
    DeclRefExpr and MemberExpr
so as to be able to recognize those that originally were
    UnresolvedLookupExpr and UnresolvedMemberExpr
and have been changed by Sema method
    Sema::FixOverloadedFunctionReference().

The new bitfield will be called, e.g.,
IsResolvedOverloadedFunctionReference.

The addition of the Boolean flag is not going to impact on the memory
footprint of the AST, because for both DeclRefExpr and MemberExpr nodes
the new flag can be packed with 3 already existing Boolean bitfields.

Would such a change be welcome?

Regards,
Enea.



More information about the cfe-dev mailing list