Closed Bug 1822949 Opened 2 years ago Closed 2 years ago

Could be nicer if `mozilla::EnumSet<T, U>` is in allowed list of `performance-unnecessary-value-param.AllowedTypes` in `.clang-tidy`

Categories

(Developer Infrastructure :: Source Code Analysis, enhancement, P5)

enhancement

Tracking

(firefox124 fixed)

RESOLVED FIXED
Tracking Status
firefox124 --- fixed

People

(Reporter: masayuki, Assigned: anba)

Details

Attachments

(1 file)

EnumSet has non-trivial copy constructor only in debug builds. Therefore, it'll be optimized as uint*_t in opt builds. Therefore, passing-by-value may be better for this. However, clangd complains this of course. According to stackoverflow this could be allowed per type.

We can have this, please submit a patch.

Severity: -- → S4
Priority: -- → P5
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/928692165b67 Add EnumSet to "performance-unnecessary-value-param.AllowedTypes". r=linter-reviewers,sylvestre
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: