[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 22 14:21:10 PDT 2024


sdkrystian wrote:

I've (unfortunately) stumbled upon a crash caused by this patch:
```cpp 
template<typename T>
struct A
{
    template<bool U>
    static constexpr bool f() requires U
    {
        return true;
    }
};

template<>
template<bool U>
constexpr bool A<short>::f() requires U
{
    return A<long>::f<U>();
}

template<>
template<bool U>
constexpr bool A<long>::f() requires U
{
    return true;
}

static_assert(A<short>::f<true>()); // crash here
```
I'll investigate tomorrow.

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


More information about the cfe-commits mailing list