[CXX] Templates specialization visibility can be wrong
authorSteven Wu <stevenwu@apple.com>
Thu, 19 Apr 2018 15:46:43 +0000 (15:46 +0000)
committerSteven Wu <stevenwu@apple.com>
Thu, 19 Apr 2018 15:46:43 +0000 (15:46 +0000)
commit79cbd1163afed91085f862442448e092fe79658c
treedfe030708d60028a9758dcecb9b399f8349abbba
parent1bc6e71f32ebadefc319c65b3f650e08e39d6aa7
[CXX] Templates specialization visibility can be wrong

Summary:
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://problem/38080953

Reviewers: rsmith, arphaman, doug.gregor

Reviewed By: doug.gregor

Subscribers: doug.gregor, cfe-commits

Differential Revision: https://reviews.llvm.org/D44670

llvm-svn: 330338
clang/lib/AST/Decl.cpp
clang/test/CodeGenCXX/visibility-pr36810.cpp [new file with mode: 0644]