This revision was automatically updated to reflect the committed changes.
Closed by commit rC330338: [CXX] Templates specialization visibility can be
wrong (authored by steven_wu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D44670?vs=142961&id=143103#toc
Repository:
rC
This revision was automatically updated to reflect the committed changes.
Closed by commit rL330338: [CXX] Templates specialization visibility can be
wrong (authored by steven_wu, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D44670
File
doug.gregor accepted this revision.
doug.gregor added a comment.
This revision is now accepted and ready to land.
LGTM, thanks
Repository:
rC Clang
https://reviews.llvm.org/D44670
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lis
steven_wu added inline comments.
Comment at: lib/AST/Decl.cpp:1078
+for (const auto *RD :
+ spec->getSpecializedTemplate()->getTemplatedDecl()->redecls()) {
+ auto Vis = getVisibilityOf(RD, kind);
doug.gregor wrote:
> Do we want to look at *all*
steven_wu updated this revision to Diff 142961.
steven_wu added a comment.
Address review feedback
Repository:
rC Clang
https://reviews.llvm.org/D44670
Files:
lib/AST/Decl.cpp
test/CodeGenCXX/visibility-pr36810.cpp
Index: test/CodeGenCXX/visibility-pr36810.cpp
=
doug.gregor added inline comments.
Comment at: lib/AST/Decl.cpp:1078
+for (const auto *RD :
+ spec->getSpecializedTemplate()->getTemplatedDecl()->redecls()) {
+ auto Vis = getVisibilityOf(RD, kind);
Do we want to look at *all* redeclarations, or
steven_wu created this revision.
steven_wu added reviewers: rsmith, arphaman.
Under some conditions, LinkageComputer can get the visibility for
ClassTemplateSpecializationDecl wrong because it failed to find the Decl
that has the explicit visibility.
This fixes:
llvm.org/bugs/pr36810
rdar://probl