[llvm] [NFC]Add assert to avoid possibly deref nullptr (PR #65564)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 08:58:28 PDT 2023


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


More information about the llvm-commits mailing list