================ @@ -78,6 +79,15 @@ matchEnableIfSpecializationImplTypename(TypeLoc TheType) { if (!TD || TD->getName() != "enable_if") return std::nullopt; + const TemplateParameterList *Params = TD->getTemplateParameters(); + if (Params->size() != 2) + return std::nullopt; ---------------- localspook wrote:
This is a check to make sure that on line 87, accessing the first parameter is valid. But now that I think about it, it might be unnecessary; are there cases where a template can have zero parameters? https://github.com/llvm/llvm-project/pull/152938 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits