[llvm-branch-commits] [clang] release/22.x: [Clang] Check the underlying type dependency in concept checking guards (PR #184079)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 9 02:49:38 PDT 2026


================
@@ -185,12 +185,13 @@ enum class TemplateSubstitutionKind : char {
       return !(*this)(Depth, Index).isNull();
     }
 
-    bool isAnyArgInstantiationDependent() const {
+    bool isAnyArgInstantiationDependent(const ASTContext &C) const {
       for (ArgumentListLevel ListLevel : TemplateArgumentLists)
         for (const TemplateArgument &TA : ListLevel.Args)
           // There might be null template arguments representing unused template
           // parameter mappings in an MLTAL during concept checking.
-          if (!TA.isNull() && TA.isInstantiationDependent())
+          if (!TA.isNull() &&
+              C.getCanonicalTemplateArgument(TA).isInstantiationDependent())
----------------
dyung wrote:

@mizvekov do you think this change is safe and targeted enough to port to the release branch?

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


More information about the llvm-branch-commits mailing list