Open Bug 1612680 Opened 5 years ago Updated 8 months ago

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.

Yes, we disabled it since it was a little bit to nosy, but I guess we can revert it back.

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.

Priority: -- → P3
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.