[clang-tools-extra] [clang-tidy][NFC] Remove unnecessary nullptr check on cast subexpr (PR #85473)
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 16 03:49:00 PDT 2024
carlosgalvezp wrote:
Shouldn't we simply `return`?
As you say, the assert is disabled in Release mode. Even if it's enabled, the author if `getSubExpr` may one day decide to remove the assert without possibly knowing all the places that do rely on that assert, leaving the code unprotected. It seems like it's trivial solution to `return` and be on the safe side.
https://github.com/llvm/llvm-project/pull/85473
More information about the cfe-commits
mailing list