Issue |
137156
|
Summary |
`bugprone-use-after-move` not reported for usage after `std::move()` with range
|
Labels |
clang-tidy,
false-negative
|
Assignees |
|
Reporter |
firewave
|
```
#include <algorithm>
#include <iostream>
#include <iterator>
#include <list>
#include <string>
int main()
{
std::list<std::string> l1 = { "1" };
std::list<std::string> l2;
std::move(l1.begin(), l1.end(), std::back_inserter(l2));
std::cout << "l1: " << *l1.cbegin() << '\n';
std::cout << "l2: " << *l2.cbegin() << '\n';
}
```
https://godbolt.org/z/Y96a6nv7h
https://en.cppreference.com/w/cpp/algorithm/move
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs