| Issue |
55509
|
| Summary |
[Front-end] crash
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
schaumb
|
The following code makes clang to crash. See [at godbolt](https://godbolt.org/z/4q6co9Gae).
```
template<int N>
struct A {
template<class C>
friend auto cica(const A<N-1>&, C) {
return N-1;
}
};
template<>
struct A<0> {
template<class C>
friend auto cica(const A<0>&, C);
};
template <int N, class AT, class = decltype(cica(AT{}, nullptr))>
static constexpr bool MakeCica(int);
template <int N, class AT>
static constexpr bool MakeCica(short, A<N+1> = {});
template <int N, class AT = A<N>, class Val = decltype(MakeCica<N, AT>(0))>
static constexpr bool has_cica = Val{};
constexpr bool cica2 = has_cica<0> || has_cica<0>;
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs