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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 3 18:06:18 PDT 2018


rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Sema/Sema.cpp:648
+          !FD->getMostRecentDecl()->isInlined() &&
+          !FD->hasAttr<ExcludeFromExplicitInstantiationAttr>())
         continue;
----------------
What's the purpose of this change?


================
Comment at: clang/test/SemaCXX/attr-exclude_from_explicit_instantiation.diagnose_on_undefined_entity.cpp:29
+
+  // expected-note at 24 {{add an explicit instantiation}}
+  // expected-note at 25 {{add an explicit instantiation}}
----------------
I generally prefer to use relative line numbers (@-5) rather than absolute ones, so that the test doesn't break if unrelated things are changed earlier in the file.


Repository:
  rC Clang

https://reviews.llvm.org/D51789





More information about the cfe-commits mailing list