================
@@ -494,6 +507,77 @@ void MoveChecker::checkPostCall(const CallEvent &Call,
assert(!C.isDifferent() && "Should not have made transitions on this path!");
}
+bool MoveChecker::evalCall(const CallEvent &Call, CheckerContext &C) const {
+
+ const auto *CE = dyn_cast_if_present<CallExpr>(Call.getOriginExpr());
+ if (!CE)
+ return false;
+
+ ProgramStateRef State = C.getState();
+
+ if (!StdMoveCall.matches(Call))
+ return false;
+
+ const auto *POS = getIteratorPosition(State, Call.getArgSVal(0));
+ if (!POS)
+ return false;
+
+ const MemRegion *ContainerRegion = POS->getContainer();
+ if (!ContainerRegion)
----------------
Xazax-hun wrote:
nit: we might not need the null check because we use `dyn_cast_if_present`
below.
https://github.com/llvm/llvm-project/pull/196602
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits