зеркало из https://github.com/microsoft/clang.git
Fix an incorrect warning about explicit template specializations for
nested types, from Michael Han! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
aa37f7a875
Коммит
95ea45072a
|
@ -1650,7 +1650,7 @@ Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc,
|
|||
if (Spec->getSpecializationKind() != TSK_ExplicitSpecialization)
|
||||
NeedEmptyTemplateHeader = true;
|
||||
else
|
||||
break;
|
||||
continue;
|
||||
} else if (Record->getTemplateSpecializationKind()) {
|
||||
if (Record->getTemplateSpecializationKind()
|
||||
!= TSK_ExplicitSpecialization &&
|
||||
|
|
|
@ -176,3 +176,34 @@ namespace PR9913 {
|
|||
template<class B>
|
||||
class S<A>::F{};
|
||||
}
|
||||
|
||||
namespace template_class_spec_perClassDecl_nested
|
||||
{
|
||||
template <typename T1> struct A {
|
||||
template <typename T2> struct B {
|
||||
template <typename T3> struct C {
|
||||
static void foo();
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
template <> struct A<int> {
|
||||
template <typename T2> struct B {
|
||||
template <typename T3> struct C {
|
||||
static void foo();
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
template <> template <typename T3> struct A<int>::B<int>::C {
|
||||
static void foo();
|
||||
};
|
||||
|
||||
template <> template <> struct A<int>::B<int>::C<int> {
|
||||
static void foo();
|
||||
};
|
||||
|
||||
template <> template<> template <typename T2> struct A<bool>::B<bool>::C {
|
||||
static void foo();
|
||||
};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче