Llvm_unreachable is widely misused

My point is, APIs will be used incorrectly, code will have bugs, etc. This will always have negative consequences, but using __builtin_unreachable makes the consequences worse. I understand that this is a non-issue in an ideal world where we can say that people should write correct code and too bad for them if they don’t, but I don’t live in that world.

1 Like