[cfe-commits] [PATCH] When instantiating function definitions set parameter names to those used in template

Douglas Gregor dgregor at apple.com
Sun Jul 18 04:40:18 PDT 2010


On Jul 17, 2010, at 5:50 PM, Peter Collingbourne wrote:

> Hi,
> 
> The attached patch makes the following change: When instantiating
> function definitions set parameter names to those used in template.
> 
> The rationale is that we are copying the entire definition including
> parameter names which may differ between the declaration and the
> definition.
> 
> This is particularly important if any parameters are unnamed in the
> declaration, as a DeclRef to an unnamed ParmVarDecl would cause the
> pretty printer to produce invalid output.
> 
> This is also required by a tool I am building on top of Clang which
> requires template instantiations to be as well formed as standard
> declarations.
> 
> Please let me know if OK to commit.

Looks good, thanks!

	- Doug



More information about the cfe-commits mailing list