Produce a hidden symbol for zed in
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct HIDDEN bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
Before we would produce a hidden symbol in
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
But adding HIDDEN to the specialization would cause us to produce a default
symbol.
llvm-svn: 157206
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index d31cf0f..8bc9eb3 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -163,7 +163,7 @@
}
static bool shouldConsiderTemplateLV(const ClassTemplateSpecializationDecl *d) {
- return !d->hasAttr<VisibilityAttr>();
+ return !d->hasAttr<VisibilityAttr>() || d->isExplicitSpecialization();
}
static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D,