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:
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:
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?
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
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
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
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
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
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
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
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
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
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
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
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
15 matches
Mail list logo