================ @@ -51,27 +47,29 @@ removeInformationStoredForDeadInstances(const CallEvent &Call, } template <class TypeMap> -void handleConstructorAndAssignment(const CallEvent &Call, CheckerContext &C, +bool handleConstructorAndAssignment(const CallEvent &Call, CheckerContext &C, SVal ThisSVal) { ProgramStateRef State = Call.getState(); if (!State) - return; + return false; auto ArgSVal = Call.getArgSVal(0); const auto *ThisRegion = ThisSVal.getAsRegion(); const auto *ArgMemRegion = ArgSVal.getAsRegion(); + if (!ArgMemRegion) + return false; ---------------- NagyDonat wrote:
Are you sure that `ThisRegion` cannot be null? I suspect that `ThisSVal` might be `UnknownVal` in some circumstances (e.g. invalidation, complexity limit reached etc.) and that would lead to a `getAsRegion()` returning `nullptr` while modeling e.g. an assignment operator call. https://github.com/llvm/llvm-project/pull/87886 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits