[Clang][Concepts] Fix the constraint equivalence checking involving parameter packs...
commit3e512ba17d90d5ab5382bae61a3e5762d2e3f42a
authorYounan Zhang <zyn7109@gmail.com>
Mon, 26 Aug 2024 06:30:26 +0000 (26 14:30 +0800)
committerTobias Hieta <tobias@hieta.se>
Tue, 24 Sep 2024 06:22:28 +0000 (24 08:22 +0200)
treef6ab265ee66ad5b11426db1a5a53664ff4527861
parent1720219a1dea5c9b99df6dd1fdfb9dc8e77054fd
[Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (#102131)

We established an instantiation scope in order for constraint
equivalence checking to properly map the uninstantiated parameters.

That mechanism mapped even packs to themselves. Consequently, parameter
packs e.g. appearing in a function call, were not expanded. So they
would end up becoming `SubstTemplateTypeParmPackType`s that circularly
depend on the canonical declaration of the function template, which is
not yet determined, hence the spurious error.

No release note as I plan to backport it to 19.

Fixes https://github.com/llvm/llvm-project/issues/101735

---------

Co-authored-by: cor3ntin <corentinjabot@gmail.com>
(cherry picked from commit e6974daa7bc100c8b88057d50f3ec3eca7282243)
clang/lib/Sema/SemaConcept.cpp
clang/test/SemaTemplate/concepts-out-of-line-def.cpp