From 0cf4f81082e9fa052e60450b8cbb10007e59931c Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 26 Aug 2021 12:39:12 -0400 Subject: [PATCH] Adding an assertion back. This assert was removed in 98339f14a0420cdfbe4215d8d1bc0a01165e0495, but during post-commit review, it was pointed out that the assert was valid. --- clang/lib/Sema/SemaConcept.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Sema/SemaConcept.cpp b/clang/lib/Sema/SemaConcept.cpp index c58244642689..2932335f3ad4 100644 --- a/clang/lib/Sema/SemaConcept.cpp +++ b/clang/lib/Sema/SemaConcept.cpp @@ -1062,6 +1062,8 @@ ReturnTypeRequirement(TemplateParameterList *TPL) : assert(TPL->size() == 1); const TypeConstraint *TC = cast(TPL->getParam(0))->getTypeConstraint(); + assert(TC && + "TPL must have a template type parameter with a type constraint"); auto *Constraint = cast(TC->getImmediatelyDeclaredConstraint()); bool Dependent =