| Summary: | function-args-by-ref warns about pass by value even when caller uses std::move | ||
|---|---|---|---|
| Product: | [Developer tools] clazy | Reporter: | David Faure <faure> |
| Component: | general | Assignee: | Unassigned bugs <unassigned-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | smartins |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
SUMMARY This testcase: int f(QVector<int> vec) { return vec.size(); } void m() { QVector<int> myvec = {1, 2, 3}; qDebug() << f(std::move(myvec)); } leads to: OBSERVED RESULT Warning: Missing reference on non-trivial type (QVector<int>) [clazy-function-args-by-ref] EXPECTED RESULT No warning SOFTWARE/OS VERSIONS clazy version 1.10 LLVM (http://llvm.org/): LLVM version 12.0.1