[clang] [clang][analyzer] Improve the modeling of insert in MismatchedIteratorChecker (PR #132596)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 23 01:00:31 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
----------------
steakhal wrote:
Isn't this test covered by the other test?
Id say, let's drop this and keep the other.
https://github.com/llvm/llvm-project/pull/132596
More information about the cfe-commits
mailing list