[PATCH] D16478: Always build a new TypeSourceInfo for function templates with parameters

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 14:07:09 PST 2016


The instantiated does get a new collection of ParmVarDecls while getting
the pattern Type which points to the pattern ParmVarDecls. So the
ParmVarDecls pointed in the instantiated are not the same as those pointed
by its Type.

Traversing by Type or by the Decl finds a different set of ParmVarDecls
which seems an inconsistency or at least a surprise.

2016-01-28 22:39 GMT+02:00 Reid Kleckner <rnk at google.com>:

> The fact that an instantiated type might point to decls from the template
> pattern seems like expected behavior. The parts of the template that are
> the same are supposed to be shared.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160129/f37b5fc1/attachment.html>


More information about the cfe-commits mailing list