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

2018-10-04 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343790: [clang] Add the exclude_from_explicit_instantiation attribute (authored by ldionne, committed by ). Changed prior to commit: https://reviews.llvm.org/D51789?vs=166590=168303#toc Repository:

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

2018-10-04 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343790: [clang] Add the exclude_from_explicit_instantiation attribute (authored by ldionne, committed by ). Changed prior to commit: https://reviews.llvm.org/D51789?vs=166590=168302#toc Repository:

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

2018-10-04 Thread Louis Dionne via Phabricator via cfe-commits
ldionne marked an inline comment as done. ldionne added inline comments. Comment at: clang/lib/Sema/Sema.cpp:648 + !FD->getMostRecentDecl()->isInlined() && + !FD->hasAttr()) continue; rsmith wrote: > What's the purpose of this change?

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

2018-10-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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()) continue; What's the

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

2018-09-21 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 166590. ldionne added a comment. Fix warnings on undefined entities Repository: rC Clang https://reviews.llvm.org/D51789 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/Sema/Sema.cpp

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

2018-09-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4683-4686 + "Member '%0' marked with 'exclude_from_explicit_instantiation' attribute is " + "not defined but an explicit template instantiation declaration exists. " + "Reliance on this

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

2018-09-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D51789#1238410, @ldionne wrote: > In https://reviews.llvm.org/D51789#1238396, @rjmccall wrote: > > > That may work for libc++'s purposes, but it's clearly inappropriate as a > > compiler rule. There are good reasons why something with

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

2018-09-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D51789#1238396, @rjmccall wrote: > That may work for libc++'s purposes, but it's clearly inappropriate as a > compiler rule. There are good reasons why something with hidden visibility > would need to be explicitly instantiated. I take

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

2018-09-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That may work for libc++'s purposes, but it's clearly inappropriate as a compiler rule. There are good reasons why something with hidden visibility would need to be explicitly instantiated. For many programmers, hidden visibility means "this is private to my

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

2018-09-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. I'm thinking about this some more, and I'm wondering whether it would be a viable solution to just exclude members marked with hidden visibility from explicit template instantiations (and declarations thereof). I thought I had been convinced by Hubert

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

2018-09-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 165768. ldionne added a comment. Add example of how to use the attribute, per Aaron's comment. Repository: rC Clang https://reviews.llvm.org/D51789 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td

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

2018-09-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:2990 +on static and non-static member functions of class templates, static data +members of class templates and member classes of class templates. + }]; An example that

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

2018-09-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 165766. ldionne added a comment. Reformat warning message and run clang-format on changed lines. Repository: rC Clang https://reviews.llvm.org/D51789 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td

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

2018-09-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4683-4686 + "Member '%0' marked with 'exclude_from_explicit_instantiation' attribute is " + "not defined but an explicit template instantiation declaration exists. " + "Reliance on

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

2018-09-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks good other than the warning, which I don't yet understand. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4683-4686 + "Member '%0' marked with 'exclude_from_explicit_instantiation' attribute is " + "not defined but an explicit