mizvekov wrote:

> can be valid C++ at all: the declaration is deleted, which means it is a 
> definition, but it has a deduced return type, which is only valid if the 
> definition has a body.

Yeah, but in C++, selecting a deleted overload is always an error, so the fact 
the return type can't be deduced doesn't matter at all from the standard's 
point of view.

If we encountered the deleted operator, from the compiler implementation 
perspective we could just emit that error and then quit. But we want to keep 
going, by doing error recovery, so we can diagnose as many problems in one go.

If the program can't be valid, and we can't give the program any interpretation 
that makes sense assuming the user didn't write anything he didn't intend, we 
are only left with the option of trying to guess what the user was trying to do 
so we can continue.

https://github.com/llvm/llvm-project/pull/211705
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to