================
@@ -1691,10 +1691,7 @@ class ConstraintRefersToContainingTemplateChecker
   using inherited::TransformTemplateTypeParmType;
   QualType TransformTemplateTypeParmType(TypeLocBuilder &TLB,
                                          TemplateTypeParmTypeLoc TL, bool) {
-    assert(TL.getDecl()->getDepth() <= TemplateDepth &&
-           "Nothing should reference a value below the actual template depth, "
-           "depth is likely wrong");
-    if (TL.getDecl()->getDepth() != TemplateDepth)
+    if (TL.getDecl()->getDepth() < TemplateDepth)
----------------
Backl1ght wrote:

I did not notice that before, and we do have similar issue when it comes to 
NTTP [godbolt](https://godbolt.org/z/ajvfcf4Po)

https://github.com/llvm/llvm-project/pull/99813
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to