adrian-prantl wrote: As a general rule of thumb, `assert()` and `llvm_unreachable()` should only be used on code paths that are (at the time of writing) actually impossible to reach. They are not a replacement for error handling. https://github.com/llvm/llvm-project/pull/65564