[PATCH] D13330: Implement __attribute__((unique_instantiation))

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 13:51:22 PDT 2015


majnemer added inline comments.

================
Comment at: include/clang/Basic/Attr.td:1463
@@ +1462,3 @@
+  let Spellings = [GNU<"unique_instantiation">];
+  let Subjects = SubjectList<[Function, CXXRecord], ErrorDiag>;
+  let Documentation = [UniqueInstantiationDocs];
----------------
They work ok, clang just thinks that it's a declaration of a variable template.  Try this:
  template <typename T> T n = T();
  extern template int n<int>;
  template int n<int>;


Repository:
  rL LLVM

http://reviews.llvm.org/D13330





More information about the cfe-commits mailing list