[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 09:05:19 PDT 2025
================
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const {
return nullptr;
}
+const TemplateSpecializationType *
+Type::getAsNonAliasTemplateSpecializationType() const {
+ for (const auto *T = this; /**/; /**/) {
+ const TemplateSpecializationType *TST =
+ T->getAs<TemplateSpecializationType>();
+ if (!TST || !TST->isTypeAlias())
+ return TST;
+ T = TST->desugar().getTypePtr();
----------------
mizvekov wrote:
No, desugar never returns a null QualType.
https://github.com/llvm/llvm-project/pull/135916
More information about the cfe-commits
mailing list