[clang] [RFC] Initial implementation of P2719 (PR #113510)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 2 00:03:35 PDT 2025
================
@@ -3096,6 +3096,29 @@ bool Type::isStdByteType() const {
return false;
}
+TemplateDecl *Type::getSpecializedTemplateDecl() const {
+ const auto *DesugaredType = getUnqualifiedDesugaredType();
+ if (auto *Specialization = DesugaredType->getAs<TemplateSpecializationType>())
+ return Specialization->getTemplateName().getAsTemplateDecl();
+ if (const auto *Record = DesugaredType->getAsCXXRecordDecl()) {
+ if (auto *CTS = dyn_cast<ClassTemplateSpecializationDecl>(Record))
----------------
ojhunt wrote:
This helper is gone :D
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list