[cfe-commits] Linkage and visibility of parameter list

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon May 28 21:00:46 PDT 2012

Clang computes the linkage and visibility of both parameter lists and
arguments lists of templates. As far as I can tell, the parameter list
computation is currently dead code. It would only have an effect in
cases where the arguments are less restrictive than the parameters.
For visibility, this would be something like

struct HIDDEN foo {
DEFAULT foo x;
template<foo *z>
void DEFAULT zed() {
template void zed<&x>();

But in case like this we currently pick the first explicit visibility
we find (the one in x). I am not sure if it possible to write an
equivalent case for linkage.

There are two patches attached. The first one changes the merging so
that the parameter list linkage and visibility computation is no
longer dead. The second one simply deletes it. For what it is worth,
gcc 4.7 agrees with the second patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: params1.patch
Type: application/octet-stream
Size: 3597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120529/4df2ce14/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: params2.patch
Type: application/octet-stream
Size: 7232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120529/4df2ce14/attachment-0001.obj>

More information about the cfe-commits mailing list