[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 29 07:28:57 PDT 2024


sdkrystian wrote:

@usx95 Minimal reproducer:

```cpp
// input.cppm

export module input;

export template<int N>
constexpr int f();

template<int N>
class B {
  template<int J>
  friend constexpr int f();
};

template struct B<0>;

template<int N>
constexpr int f() {
  return N;
}
```

```cpp
// input.cpp

import input;

static_assert(f<1>() == 1); // error: static assertion failed
```

I already have a patch that will fix this and the crash I posted a few days ago. Just waiting until two of my other PRs are merged first before I open a PR.

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


More information about the cfe-commits mailing list