Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6, 6.7
-
None
-
-
3ca5a7b3b (dev)
Description
CodeChecker generates dozens of warnings (enough that more serious warnings likely get lost in the noise) about std::move() being used on trivially-copyable types (such as double), which is fatuous and pointless. This probably also provokes warnings from regular compilers. All of which may be noise about something harmless (if pointless), but some of the examples really do look like whatever's generating this code is wildly over-eager in its use of std::move(). For example:
stdmove of the variable 'r7_1' of the trivially-copyable type 'double' has no effect; remove stdmove() in file:/home/cc-runs/analyzer_builds/qtdeclarative/src/quickcontrols/material/.rcc/qmlcache/qtquickcontrols2materialstyleplugin_ToolButton_qml.cpp line:1790 col:9 r2_3 = (std::move(r7_1) / std::move(r2_3)); Product:qtdeclarative-dev Severity:MEDIUM Analyzer:clang-tidy Checker:performance-move-const-arg Run:qtdeclarative-dev-20230626-90ddb9ef28 Report-hash:364bece03677f8e6e4a5653d55659ae4
As these are generated files, I'm not in a position to actually inspect the generated output (my build tree doesn't contain that file) but the snippet above does look positively silly.
Is it possible to teach the tool generating this code to be at least a little more restrained about its use of std::move() ?
Attachments
Issue Links
- relates to
-
QTQAINFRA-5423 CodeChecker spams us about moc-generated code using std::move()
-
- Closed
-
- resulted in
-
QTBUG-119348 Allow std::move'ing registers between different basic blocks
-
- Reported
-