[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)
Qizhi Hu via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 9 22:33:05 PDT 2023
================
@@ -599,7 +599,7 @@ void transferAssignment(const CXXOperatorCallExpr *E, BoolValue &HasValueVal,
LatticeTransferState &State) {
assert(E->getNumArgs() > 0);
- if (auto *Loc = cast<RecordStorageLocation>(
+ if (auto *Loc = dyn_cast_or_null<RecordStorageLocation>(
----------------
jcsxky wrote:
updated
https://github.com/llvm/llvm-project/pull/68510
More information about the cfe-commits
mailing list