[clang] [clang][analyzer] Detect use-after-move for 3-arg std::move (PR #196602)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 04:15:01 PDT 2026
================
@@ -0,0 +1,29 @@
+// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core,cplusplus.Move,alpha.cplusplus.IteratorModeling -analyzer-config aggressive-binary-operation-simplification=true -analyzer-config c++-container-inlining=false %s -verify -analyzer-config display-checker-name=false
+
+#include "Inputs/system-header-simulator-cxx.h"
+
+
+//===----------------------------------------------------------------------===//
+// Test suite for test functions that require both MoveChecker.cpp and
+// IteratorModeling.cpp to be enabled.
+// NOTE: Currently the iterator dereference detection is only working when
+// IteratorModeling is enabled.
+//===----------------------------------------------------------------------===//
+
+void iteratorDerefSource() {
----------------
steakhal wrote:
Could you incorporate the `gh_xxxx` ticket number in the test function name to make it stand out that this was fixing a specific issue?
https://github.com/llvm/llvm-project/pull/196602
More information about the cfe-commits
mailing list