ojhunt wrote:

> Yes the correct behavior for return type deduction for a function with no 
> non-discarded return statements is for it to be deduced as void: 
> https://godbolt.org/z/qaYebb5q9

Right, once you pointed it out I remembered that not all of the 
semantic/erroneous code in discarded statements is considered relevant, and 
once that was there the behavior of the return type deduction is consistent and 
reasonable, all things considered.

I'm still confused by how it is the return type is a bool though.

I'm unsure what the distinction between deduced vs inferred return types is 
because from my FL days those mean the same thing :D


https://github.com/llvm/llvm-project/pull/153921
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to