================
@@ -397,14 +397,21 @@ struct TargetFinder {
         if (const auto *USD = DTST->getTemplateName().getAsUsingShadowDecl())
           Outer.add(USD, Flags);
 
-        // FIXME: This is a workaround for https://llvm.org/PR42914,
-        // which is causing DTST->getDeducedType() to be empty. We
-        // fall back to the template pattern and miss the instantiation
-        // even when it's known in principle. Once that bug is fixed,
-        // the following code can be removed (the existing handling in
-        // VisitDeducedType() is sufficient).
-        if (auto *TD = DTST->getTemplateName().getAsTemplateDecl())
+        TemplateDecl *TD = DTST->getTemplateName().getAsTemplateDecl();
+        // Template template parameters have no templated decl, so they must
+        // refer to the parameter itself.
+        if (const auto *Parm =
+                llvm::dyn_cast_or_null<TemplateTemplateParmDecl>(TD)) {
----------------
HighCommander4 wrote:

Good catch! Fixed, and added an additional test case for pack indexing.

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

Reply via email to