Closed Bug 2015410 Opened 2 months ago Closed 2 months ago

Fix clang-tidy warnings in js/src/builtin/intl and js/src/builtin/temporal

Categories

(Core :: JavaScript: Internationalization API, task, P3)

task

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

clang-tidy currently doesn't work correctly (bug 2015386), so some warnings went unnoticed, because Phabricator didn't nag about them.

Fixes various clang-tidy warnings, like:

  • auto instead of auto.
  • Unnecessary explicit initialisation of class members.
  • Missing default initialisation of class members.
  • length() == 0 instead of empty() tests.
  • Missing explicit casts to narrow int types.
  • Missing default case in switch statements.
  • bool return statements which can be simplified.

Also fix clang-tidy warnings in "js/src/builtin/temporal".

Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/9d0bbd803fcd https://hg.mozilla.org/integration/autoland/rev/5cbb2a99ece8 Part 1: Fix clang-tidy warnings in js/src/builtin/intl. r=spidermonkey-reviewers,arai https://github.com/mozilla-firefox/firefox/commit/1f9af96e8664 https://hg.mozilla.org/integration/autoland/rev/c631abac212f Part 2: Fix clang-tidy warnings in js/src/builtin/temporal. r=spidermonkey-reviewers,arai
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f42dce2a0f52 https://hg.mozilla.org/integration/autoland/rev/d270382b770b Revert "Bug 2015410 - Part 2: Fix clang-tidy warnings in js/src/builtin/temporal. r=spidermonkey-reviewers,arai" for causing Calendar.cpp related failures.

Backed out for causing failures in Calendar.cpp
Backout Link
Push with failures
Failure Log
Failure line Assertion failure: 1 <= months && months <= CalendarMonthsPerYear(calendarId), at /builds/worker/checkouts/gecko/js/src/builtin/temporal/Calendar.cpp:X

Flags: needinfo?(andrebargull)

Thanks. There was a simple oversight in a new assertion.

Flags: needinfo?(andrebargull)
Blocks: temporal
Severity: -- → N/A
Priority: -- → P3
Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/117395f1d500 https://hg.mozilla.org/integration/autoland/rev/296c3299cf8a Part 1: Fix clang-tidy warnings in js/src/builtin/intl. r=spidermonkey-reviewers,arai https://github.com/mozilla-firefox/firefox/commit/2501809f40da https://hg.mozilla.org/integration/autoland/rev/5034f0e96917 Part 2: Fix clang-tidy warnings in js/src/builtin/temporal. r=spidermonkey-reviewers,arai
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: