================
@@ -4265,6 +4265,19 @@ class LookupVisibleHelper {
           const auto *TST = BaseType->getAs<TemplateSpecializationType>();
           if (!TST)
             continue;
+          // The base may be named through an alias template, whose
+          // TemplateName is a TypeAliasTemplateDecl rather than the
+          // ClassTemplateDecl we are after. Look through the alias, otherwise
+          // the base is skipped entirely. libstdc++'s std::allocator<T> hits
+          // this: it derives from __allocator_base<T>, an alias template for
+          // __new_allocator<T>.
+          while (TST->isTypeAlias()) {
+            const auto *Aliased =
+                TST->getAliasedType()->getAs<TemplateSpecializationType>();
+            if (!Aliased)
+              break;
+            TST = Aliased;
----------------
ckandeler wrote:

Done.

https://github.com/llvm/llvm-project/pull/223713
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to