================
@@ -1707,10 +1707,12 @@ clang::getReplacedTemplateParameter(Decl *D, unsigned
Index) {
case Decl::Kind::CXXConstructor:
case Decl::Kind::CXXDestructor:
case Decl::Kind::CXXMethod:
- case Decl::Kind::Function:
- return getReplacedTemplateParameter(
- cast<FunctionDecl>(D)->getTemplateSpecializationInfo()->getTemplate(),
- Index);
+ case Decl::Kind::Function: {
+ const FunctionTemplateSpecializationInfo *Info =
+ cast<FunctionDecl>(D)->getTemplateSpecializationInfo();
+ return {Info->getTemplate()->getTemplateParameters()->getParam(Index),
----------------
shafik wrote:
So why does `getReplacedTemplateParameter` not provide the right answer here
and why is the fix not done inside `getReplacedTemplateParameter`?
https://github.com/llvm/llvm-project/pull/189559
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits