[clang-tools-extra] [NFC] Fix potential nullptr dereference. (PR #138283)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri May 2 10:40:44 PDT 2025


vbvictor wrote:

I don't have a strong opinion on this, but this `assert` may be a sign of "false safety".
In release builds, it's a no-op, so end users will experience a regular Segfault, e.g. like this issue https://github.com/llvm/llvm-project/issues/135665.
Debug builds with asserts are usually used in development process where tests run regularly, so all `nullptr` dereferences must be caught there.
TLDR, adding this `assert` "retrospectively" probably have no impact.

https://github.com/llvm/llvm-project/pull/138283


More information about the cfe-commits mailing list