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

Nathan Sidwell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 28 12:36:02 PST 2022


urnathan added inline comments.


================
Comment at: clang/test/Modules/inconsist-export-template.cpp:26-34
+export template<class T>
+class C {
+
+};
+
+template<>
+class C<int> {
----------------
I think you'll need a member fn to have something to check the linkage of?  Might be worth checking instantiating a partial specialization gets things right too?  along the lines of ..

export template<typename> class C {};
template<typename T> class C<T *> { void M(){}; };

void Use (C<int *> &p) { p.M(); }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120397



More information about the cfe-commits mailing list