PR24483: Delete some dead/incorrect code that triggered assertions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245609 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Smith 2015-08-20 20:45:25 +00:00
parent 9677130fc2
commit b9d0b27d86
2 changed files with 6 additions and 19 deletions

View File

@ -2469,25 +2469,6 @@ DeclResult Sema::ActOnVarTemplateSpecialization(
false, Converted))
return true;
// Check that the type of this variable template specialization
// matches the expected type.
TypeSourceInfo *ExpectedDI;
{
// Do substitution on the type of the declaration
TemplateArgumentList TemplateArgList(TemplateArgumentList::OnStack,
Converted.data(), Converted.size());
InstantiatingTemplate Inst(*this, TemplateKWLoc, VarTemplate);
if (Inst.isInvalid())
return true;
VarDecl *Templated = VarTemplate->getTemplatedDecl();
ExpectedDI =
SubstType(Templated->getTypeSourceInfo(),
MultiLevelTemplateArgumentList(TemplateArgList),
Templated->getTypeSpecStartLoc(), Templated->getDeclName());
}
if (!ExpectedDI)
return true;
// Find the variable template (partial) specialization declaration that
// corresponds to these arguments.
if (IsPartialSpecialization) {

View File

@ -34,3 +34,9 @@ namespace InstantiationDependent {
static_assert(a<sizeof(sizeof(f(T())))> == 0, ""); // expected-error {{static_assert failed}}
}
}
namespace PR24483 {
template<typename> struct A;
template<typename... T> A<T...> models;
template<> struct B models<>; // expected-error {{incomplete type 'struct B'}} expected-note {{forward declaration}}
}