[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 1 00:57:05 PST 2022


iains added inline comments.


================
Comment at: clang/test/Modules/inconsist-export-template.cpp:19-23
+// FIXME: We should reject following specialization,
+// since it tries to export a name which is already introduced.
+export template <>
+void f1<int>() {
+
----------------
ChuanqiXu wrote:
> urnathan wrote:
> > I don't think we should be testing for ill-formed code here.  We want to verify that explicit instantiations, explicit specializations and implicit instantiations all get the expected linkage -- both external linkage on exported entities, module linkage on non-exported module-purview entities.
> I think it could add an `expected-error` once we complete the check in compiler so I added the FIXME here.
would it be possible to find a suitable place in the source for the FIXME?
I would be concerned that it could get forgotten in the test-case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120397/new/

https://reviews.llvm.org/D120397



More information about the cfe-commits mailing list