[cfe-dev] Getting template arguments (as written) from a function template specialization.

Enea Zaffanella zaffanella at cs.unipr.it
Thu May 20 07:12:29 PDT 2010


Hello.

We would like to retrieve a TemplateArgumentListInfo (or equivalent 
information) from a FunctionDecl node representing an explicit function 
template specialization.

The FunctionTemplateSpecializationInfo structure only encodes the 
semantic form of the template arguments, i.e., a TemplateArgumentList*.
Would it be OK to also add a TemplateArgumentListInfo*?

We noted that FunctionTemplateSpecializationInfo are profiled.
As far as we understand, the new data member should not be used in the 
profiling step. (Correct?)

If the proposal above is OK, then probably all we will need to do in 
this first step is to modify calls to function
    FunctionDecl::setFunctionTemplateSpecialization()
inside
    Sema::CheckFunctionTemplateSpecialization()

In a second step, we will consider whether or not a similar change is 
required when building explicit instantiations of function templates 
(rather than specializations) ... things should not be much different. 
Are there other issues we may be missing?

Regards,
Enea.



More information about the cfe-dev mailing list