[PATCH] D51789: [clang] Add the exclude_from_explicit_instantiation attribute
Louis Dionne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 4 08:51:27 PDT 2018
ldionne marked an inline comment as done.
ldionne added inline comments.
================
Comment at: clang/lib/Sema/Sema.cpp:648
+ !FD->getMostRecentDecl()->isInlined() &&
+ !FD->hasAttr<ExcludeFromExplicitInstantiationAttr>())
continue;
----------------
rsmith wrote:
> What's the purpose of this change?
It's so that we diagnose a member function marked with `exclude_from_explicit_instantiation` that is used but not defined just like we do for an `inline` function. This causes us to `push_back` the declaration (line 668 below) into the vector of `Undefined`-but-used declarations, which we use to trigger a diagnostic somewhere else.
Repository:
rC Clang
https://reviews.llvm.org/D51789
More information about the cfe-commits
mailing list