[clang] [clang][analyzer] Detect use-after-move for 3-arg std::move (PR #196602)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 01:34:05 PDT 2026


================
@@ -495,6 +507,78 @@ 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 *BeginCall =
----------------
Xazax-hun wrote:

That being said, this is not a blocker for this PR but we could leave a TODO behind. 

https://github.com/llvm/llvm-project/pull/196602


More information about the cfe-commits mailing list