tbaederr wrote:
This breaks `SemaTemplate/instantiate-self.cpp`, in particular
```c++
template<typename T> constexpr T f(T);
template<typename T> constexpr T g(T t) {
// FIXME: It'd be nice to say that the function is currently being defined,
rather than being undefined.
typedef int arr[f(T())]; // expected-error {{variable length array}}
expected-note {{undefined function 'f<int>'}}
return t;
}
template<typename T> constexpr T f(T t) { // expected-note {{declared here}}
typedef int arr[g(T())]; // expected-error {{zero size array}}
expected-note {{instantiation of}}
return t;
}
int n = f(0); // expected-note 2{{instantiation of}}
```
https://github.com/llvm/llvm-project/pull/165002
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits