Do not use 'else' after 'return' in /js/src/frontend/Parser.cpp

RESOLVED FIXED in Firefox 55

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: janx, Assigned: janx)

Tracking

(Blocks: 1 bug)

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 months ago
When running static analysis on /js/src/jit/x86-shared/Disassembler-x86-shared.cpp with the following command:

    $ run-clang-tidy-4.0.py -j 18 -p obj-x86_64-pc-linux-gnu/ -checks=-*,clang-analyzer-deadcode.DeadStores js/src/jit/x86-shared/

We get the following warning:

    /home/user/firefox/js/src/frontend/Parser.cpp:1495:11: warning: do not use 'else' after 'return' [readability-else-after-return]
            } else {
              ^
(Assignee)

Comment 1

5 months ago
Created attachment 8869120 [details] [diff] [review]
Readability: Do not use 'else' after 'return' in /js/src/frontend/Parser.cpp.
Attachment #8869120 - Flags: review?(bbouvier)
(Assignee)

Updated

5 months ago
Assignee: nobody → janx
Comment on attachment 8869120 [details] [diff] [review]
Readability: Do not use 'else' after 'return' in /js/src/frontend/Parser.cpp.

Review of attachment 8869120 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!

Can you remove "readability" from the changeset message and make sure that try tests (jsreftests + jittests) pass, please?
Attachment #8869120 - Flags: review?(bbouvier) → review+
(Assignee)

Comment 3

5 months ago
Created attachment 8869734 [details] [diff] [review]
Do not use 'else' after 'return' in /js/src/frontend/Parser.cpp.

Updated commit message, rebased, r+ carried over, try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2b53eb1bcf42
Attachment #8869734 - Flags: review+
(Assignee)

Updated

5 months ago
Attachment #8869120 - Attachment is obsolete: true
(Assignee)

Comment 4

5 months ago
The assertion failures in /src/ld/ld.hpp on "OS X 10.7 opt" seem unrelated (see orange try jobs "cgc" and "p"). Please land this patch.
Keywords: checkin-needed

Comment 5

5 months ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8fa35ea59bdd
Do not use 'else' after 'return' in /js/src/frontend/Parser.cpp. r=bbouvier
Keywords: checkin-needed

Comment 6

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8fa35ea59bdd
Status: NEW → RESOLVED
Last Resolved: 5 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
https://hg.mozilla.org/projects/cedar/rev/8fa35ea59bdd416eadfec7def8e9c29222d908cc
Bug 1366021 - Do not use 'else' after 'return' in /js/src/frontend/Parser.cpp. r=bbouvier
(Assignee)

Updated

4 months ago
Depends on: 712350
(Assignee)

Updated

4 months ago
Blocks: 712350
No longer depends on: 712350
You need to log in before you can comment on or make changes to this bug.