Adding an assertion back.

This assert was removed in 98339f14a0,
but during post-commit review, it was pointed out that the assert was
valid.
This commit is contained in:
Aaron Ballman 2021-08-26 12:39:12 -04:00
parent 9d2c859ebb
commit 0cf4f81082
1 changed files with 2 additions and 0 deletions

View File

@ -1062,6 +1062,8 @@ ReturnTypeRequirement(TemplateParameterList *TPL) :
assert(TPL->size() == 1);
const TypeConstraint *TC =
cast<TemplateTypeParmDecl>(TPL->getParam(0))->getTypeConstraint();
assert(TC &&
"TPL must have a template type parameter with a type constraint");
auto *Constraint =
cast<ConceptSpecializationExpr>(TC->getImmediatelyDeclaredConstraint());
bool Dependent =