================
@@ -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;
 
   // Make changes to the state according to type of constructor/assignment
   bool IsCopy = isCopyConstructorCall(Call) || isCopyAssignmentCall(Call);
   bool IsMove = isMoveConstructorCall(Call) || isMoveAssignmentCall(Call);
   // First we handle copy and move operations
   if (IsCopy || IsMove) {
-    const QualType *OtherQType = State->get<TypeMap>(ArgMemRegion);
-
+    // const QualType *OtherQType = State->get<TypeMap>(ArgMemRegion);
----------------
NagyDonat wrote:

```suggestion
```
Remove this comment -- it seems to be an accidental leftover.

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

Reply via email to