================
@@ -0,0 +1,44 @@
+// RUN: %clang_analyze_cc1 -std=c++17 -verify %s \
+// RUN:
-analyzer-checker=core,cplusplus.Move,alpha.cplusplus.IteratorModeling \
+// RUN: -analyzer-config aggressive-binary-operation-simplification=true \
+// RUN: -analyzer-config c++-container-inlining=false
+
+#include "Inputs/system-header-simulator-cxx.h"
+
+enum Target {MovedFromSource, Destination};
+
+std::string gh137157_iteratorDerefList(Target trg) {
+ std::list<std::string> l1;
+ l1.push_back("l1");
+ std::list<std::string> l2;
+
+ switch (trg) {
+ case MovedFromSource: {
+ std::move(l1.begin(), l1.end(), std::back_inserter(l2));
----------------
Xazax-hun wrote:
Didn't we use to have tests where we store the intermediate iterator somewhere
like `auto it = l1.begin()` and pass in `it`? Or does that not work?
https://github.com/llvm/llvm-project/pull/196602
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits