[clang-tools-extra] [clang-tidy][NFC] Remove unnecessary nullptr check on cast subexpr (PR #85473)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 16 02:43:12 PDT 2024
https://github.com/PiotrZSL approved this pull request.
First this null-ptr check does nothing because in line 114 we still missing nullptr check.
Proper way would be to "return" when we find nullptr were it shoudnt.
Second thing, asserts mean nothing. In release mode they are disabled. This mean that if we get nullptr, then we going to crash.
Change is fine for me, but not because there is assert but because in line 114 dereference will happened anyway.
https://github.com/llvm/llvm-project/pull/85473
More information about the cfe-commits
mailing list