[PATCH] D51789: [clang] Add the no_extern_template attribute

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 14 10:07:52 PDT 2018


rsmith added a comment.

In https://reviews.llvm.org/D51789#1234903, @ldionne wrote:

> I think now's a good time to bikeshed the name of the attribute if you have other suggestions.


OK, so the semantics of this attribute are "explicit instantiation declarations or definitions applied to the enclosing class do not apply to this member", right? So it opts the member out of both `extern template` and (non-`extern`) `template`, but only when applied to an enclosing class.

Maybe something like `exclude_from_explicit_instantiation`? That's a little longer than I'd like, but if it's going to be hidden behind a macro most of the time I could live with it.
Or maybe `no_transitive_instantiation`? That's less explicit about the purpose of the attribute, but is a more comfortable length.


Repository:
  rC Clang

https://reviews.llvm.org/D51789





More information about the cfe-commits mailing list