================ @@ -4126,7 +4126,11 @@ static bool isTemplateArgumentTemplateParameter(const TemplateArgument &Arg, return false; const NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl()); - return NTTP && NTTP->getDepth() == Depth && NTTP->getIndex() == Index; + if (!NTTP || NTTP->getDepth() != Depth || NTTP->getIndex() != Index) + return false; + QualType ParamType = cast<NonTypeTemplateParmDecl>(Param)->getType(); + QualType NTTPType = NTTP->getType(); + return ParamType.getCanonicalType() == NTTPType.getCanonicalType(); ---------------- keinflue wrote:
Hm, after thinking about it, this change does mess with the original interpretation of the function and its name. I think I will move the test into its caller instead. https://github.com/llvm/llvm-project/pull/152864 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits