================ @@ -123,6 +123,9 @@ static const NamedDecl *getFailureForNamedDecl(const NamedDecl *ND) { if (const auto *Method = dyn_cast<CXXMethodDecl>(ND)) { if (const CXXMethodDecl *Overridden = getOverrideMethod(Method)) Canonical = cast<NamedDecl>(Overridden->getCanonicalDecl()); + else if (const FunctionTemplateDecl *Primary = Method->getPrimaryTemplate()) + Canonical = + cast<NamedDecl>(Primary->getTemplatedDecl()->getCanonicalDecl()); ---------------- PiotrZSL wrote:
It's fine, but would be really nice to check if result of getTemplatedDecl isn't nullptr (just in case). https://github.com/llvm/llvm-project/pull/91954 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits