Ferdi265 wrote:
There are also several related cases that compile with GCC, but don't with
Clang, and that this PR does not fix:
```c++
// conversion_call.cpp
int main() {
auto a = []consteval{return 3;};
auto b = ((int(*)())a)();
}
```
and
```c++
// function_call.cpp
consteval int g() {return 3;}
int main() {
auto b = ((int(*)())g)();
}
```
and
```c++
// function_generic_call.cpp
consteval int g(auto) {return 3;}
int main() {
auto b = ((int(*)(int))g)(0);
}
```
The latter example has nothing to do with lambdas, but feels very similar to
the broken example (`conversion_generic_call.cpp`) from the above comment.
https://github.com/llvm/llvm-project/pull/235356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits