| Issue |
52802
|
| Summary |
Deleted function can return incomplete type
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Fedr
|
The following program is valid:
```
struct A;
A f() = delete;
```
It is accepted by GCC, but rejected by Clang with the error:
```
error: incomplete result type 'A' in function definition
```
which is wrong per https://timsong-cpp.github.io/cppwp/n4868/dcl.fct.def#general-2.sentence-3
Demo: https://gcc.godbolt.org/z/937PEz1h3
Related discussion: https://stackoverflow.com/q/70410542/7325599
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs