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

Peter Collingbourne peter at pcc.me.uk
Sat Jul 17 17:50:27 PDT 2010


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.

Thanks,
-- 
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-When-instantiating-function-definitions-set-paramete.patch
Type: text/x-diff
Size: 1913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100718/dd1ec53c/attachment.patch>


More information about the cfe-commits mailing list