Move operations should be declared noexcept and deviations should produce a static analysis warning
Categories
(Developer Infrastructure :: Source Code Analysis, task, P3)
Tracking
(Not tracked)
People
(Reporter: sg, Unassigned)
Details
Even though we build with -fno-exceptions, template code (often using std::move_if_noexcept
) may still still behave differently depending on whether move operations are declared noexcept
. This was pointed out in Bug 1553806, but still Bug 1609864 disabled the clang-tidy check performance-noexcept-move-constructor
, which should also be reverted.
Since gcc will fail compilation if a defaulted move operation specifies noexcept
, but a member does not, this needs to be applied to the whole codebase at once.
Comment 1•5 years ago
|
||
Yes, we disabled it since it was a little bit to nosy, but I guess we can revert it back.
Reporter | ||
Comment 2•5 years ago
|
||
Maybe we should land a patch that fixes the existing violations by applying the fix-it hints, which is a prerequisite for doing this right on types that depend on existing types, at least when defaulting the operations.
Updated•4 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•