File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ matchEnableIfSpecializationImplTypename(TypeLoc TheType) {
7979 if (!TD || TD->getName () != " enable_if" )
8080 return std::nullopt ;
8181
82+ assert (!TD->getTemplateParameters ()->empty () &&
83+ " found template with no template parameters?" );
8284 const auto *FirstParam = dyn_cast<NonTypeTemplateParmDecl>(
8385 TD->getTemplateParameters ()->getParam (0 ));
8486 if (!FirstParam || !FirstParam->getType ()->isBooleanType ())
@@ -114,6 +116,8 @@ matchEnableIfSpecializationImplTrait(TypeLoc TheType) {
114116 if (!Specialization->isTypeAlias ())
115117 return std::nullopt ;
116118
119+ assert (!TD->getTemplateParameters ()->empty () &&
120+ " found template with no template parameters?" );
117121 const auto *FirstParam = dyn_cast<NonTypeTemplateParmDecl>(
118122 TD->getTemplateParameters ()->getParam (0 ));
119123 if (!FirstParam || !FirstParam->getType ()->isBooleanType ())
You can’t perform that action at this time.
0 commit comments