forked from OSchip/llvm-project
Process attributes in explicit template instatiation definitions. Fixes PR11690.
llvm-svn: 147441
This commit is contained in:
parent
3a5ff5cbd2
commit
0b0620776a
|
@ -5988,6 +5988,9 @@ Sema::ActOnExplicitInstantiation(Scope *S,
|
|||
Specialization->setExternLoc(ExternLoc);
|
||||
Specialization->setTemplateKeywordLoc(TemplateLoc);
|
||||
|
||||
if (Attr)
|
||||
ProcessDeclAttributeList(S, Specialization, Attr);
|
||||
|
||||
// Add the explicit instantiation into its lexical context. However,
|
||||
// since explicit instantiations are never found by name lookup, we
|
||||
// just put it into the declaration context directly.
|
||||
|
|
|
@ -466,3 +466,13 @@ namespace PR10113 {
|
|||
// CHECK: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
|
||||
// CHECK-HIDDEN: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
|
||||
}
|
||||
|
||||
namespace PR11690 {
|
||||
template<class T> struct Class {
|
||||
void size() const {
|
||||
}
|
||||
};
|
||||
template class DEFAULT Class<char>;
|
||||
// CHECK: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
|
||||
// CHECK-HIDDEN: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue