[clang] [Clang] support friend declarations with a dependent nested-name-specifier (PR #191268)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 29 09:30:23 PDT 2026
================
@@ -2769,6 +2798,25 @@ bool StructuralEquivalenceContext::CheckCommonEquivalence(Decl *D1, Decl *D2) {
return true;
}
+bool StructuralEquivalenceContext::IsEquivalent(TemplateParameterList *TPL1,
+ TemplateParameterList *TPL2) {
+ if (TPL1 == TPL2)
+ return true;
+
+ if (!TPL1 || !TPL2)
+ return false;
+
+ if (TPL1->size() != TPL2->size())
+ return false;
+
+ for (unsigned I = 0, N = TPL1->size(); I != N; ++I) {
+ if (!IsEquivalent(TPL1->getParam(I), TPL2->getParam(I)))
+ return false;
+ }
+
+ return true;
+}
----------------
mizvekov wrote:
AFAIR there is a requires clause that is part of the template parameter list as well.
https://github.com/llvm/llvm-project/pull/191268
More information about the cfe-commits
mailing list