[libcxx-commits] [clang] [libcxx] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

Younan Zhang via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 9 09:18:29 PDT 2025


================
@@ -234,23 +234,39 @@ enum class TemplateSubstitutionKind : char {
     /// Replaces the current 'innermost' level with the provided argument list.
     /// This is useful for type deduction cases where we need to get the entire
     /// list from the AST, but then add the deduced innermost list.
-    void replaceInnermostTemplateArguments(Decl *AssociatedDecl, ArgList Args) {
+    void replaceInnermostTemplateArguments(Decl *AssociatedDecl, ArgList Args,
+                                           bool Final = false) {
       assert((!TemplateArgumentLists.empty() || NumRetainedOuterLevels) &&
              "Replacing in an empty list?");
 
       if (!TemplateArgumentLists.empty()) {
-        assert((TemplateArgumentLists[0].AssociatedDeclAndFinal.getPointer() ||
-                TemplateArgumentLists[0].AssociatedDeclAndFinal.getPointer() ==
-                    AssociatedDecl) &&
-               "Trying to change incorrect declaration?");
+        // assert((!TemplateArgumentLists[0].AssociatedDeclAndFinal.getPointer()
+        // ||
+        //         TemplateArgumentLists[0].AssociatedDeclAndFinal.getPointer()
+        //         ==
+        //             AssociatedDecl) &&
+        //         "Trying to change incorrect declaration?");
----------------
zyn0217 wrote:

Unused

https://github.com/llvm/llvm-project/pull/141776


More information about the libcxx-commits mailing list