| Issue |
55388
|
| Summary |
usage of moved variable in same function call not detected by clang-tidy when function takes rvalue
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
firewave
|
```cpp
#include <list>
extern void func(std::list<int>&&, std::list<int>); // remove "&&" for the warning to appear
extern std::list<int> func2(const std::list<int>&);
static void f(std::list<int>l)
{
func(std::move(l), func2(l));
l.size(); // bugprone-use-after-move detected
}
```
https://godbolt.org/z/oYEP37nYc
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs