[clang] [clang][analyzer] Detect use-after-move for 3-arg std::move (PR #196602)
Benedek Kaibas via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 04:23:53 PDT 2026
================
@@ -1015,3 +1015,22 @@ struct OtherMoveSafeClasses {
// aggressive-note at -2 {{Moved-from object 'Task' is moved}}
}
};
+
+void safeOperatorAfterMove() {
+ std::list<std::string> l1;
+ l1.push_back("l1");
+ std::list<std::string> l2;
----------------
benedekaibas wrote:
This test suite looks so good. Thank you for sharing it! I will definitely rewrite the test suite to this.
https://github.com/llvm/llvm-project/pull/196602
More information about the cfe-commits
mailing list