[clang] [clang][analyzer] Improve the modeling of insert in MismatchedIteratorChecker (PR #132596)

via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 23 01:30:10 PDT 2025


================
@@ -0,0 +1,12 @@
+// RUN: %clang_analyze_cc1 -analyzer-config aggressive-binary-operation-simplification=true -analyzer-checker=alpha.cplusplus.MismatchedIterator -analyzer-output text -verify %s
+
+// expected-no-diagnostics
+
+#include "Inputs/system-header-simulator-cxx.h"
+
+void f()
+{
+    std::list<int> l;
+    std::unordered_set<int> us;
+    us.insert(l.cbegin(), l.cend()); // no warning
----------------
flovent wrote:

This file is deleted in new commit

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


More information about the cfe-commits mailing list