Fix clang static-analysis and formatting issues
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox88 | --- | fixed |
People
(Reporter: rhunt, Assigned: rhunt)
Details
Attachments
(12 files, 1 obsolete file)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
There are some formatting and static-analysis issues in js/src/wasm.
None of them are significant, but they are noise that appears on every commit when it's being reviewed that touches code near these issues.
| Assignee | ||
Comment 1•4 years ago
|
||
The patches are the result of running ./mach static-analysis check --fix --path js/src/wasm, then grouping the changes in themes and filtering out dubious changes.
I'm open to debate on whether we should do all of these changes, the goal is really to lower the amount of preexisting issues when we're reviewing new code.
| Assignee | ||
Comment 2•4 years ago
|
||
Run ./mach clang-format --path js/src/ to fix style issues
that have been committed.
Updated•4 years ago
|
| Assignee | ||
Comment 3•4 years ago
|
||
clang static-analysis prefers to use range-based for loops whenever
it is possible. Some of the replacements are obvious improvements,
while others are a bit murky. Open to discussion on whether these
all make sense.
Depends on D108203
| Assignee | ||
Comment 4•4 years ago
|
||
Depends on D108204
| Assignee | ||
Comment 5•4 years ago
|
||
The autofix algorithm for this rule appears to use the definition parameter
name when there is a mismatch. This seems reasonable to me from glancing at
the results.
Depends on D108205
| Assignee | ||
Comment 6•4 years ago
|
||
Depends on D108206
| Assignee | ||
Comment 7•4 years ago
|
||
Depends on D108207
| Assignee | ||
Comment 8•4 years ago
|
||
Depends on D108208
| Assignee | ||
Comment 9•4 years ago
|
||
clang static-analysis complains if you have a variable that is
not initialized at its definition, even if it's always initialized
before it's first use. I don't think it's worth trying to find
a way to appease this warning at this time.
This commit adds initializers to all instances of Nothing to
remove some of these warnings, as this is a trivial case to
fix.
Depends on D108209
| Assignee | ||
Comment 10•4 years ago
|
||
Depends on D108210
| Assignee | ||
Comment 11•4 years ago
|
||
I don't know why clang static-analysis wants noexcept specifiers on
these TypeDef methods, but it's trivially true so I don't see an issue
with it.
Depends on D108211
| Assignee | ||
Comment 12•4 years ago
|
||
Depends on D108212
| Assignee | ||
Comment 13•4 years ago
|
||
Depends on D108213
| Assignee | ||
Comment 14•4 years ago
|
||
Depends on D108214
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 15•4 years ago
|
||
Comment 16•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ea08486942c8
https://hg.mozilla.org/mozilla-central/rev/d0a0f6f44e87
https://hg.mozilla.org/mozilla-central/rev/67ed32df18ab
https://hg.mozilla.org/mozilla-central/rev/1580c7515537
https://hg.mozilla.org/mozilla-central/rev/807faa5f9eea
https://hg.mozilla.org/mozilla-central/rev/af8ab06489e0
https://hg.mozilla.org/mozilla-central/rev/fb0c175ffba3
https://hg.mozilla.org/mozilla-central/rev/4dc5cd8f68da
https://hg.mozilla.org/mozilla-central/rev/16d47ee5c12f
https://hg.mozilla.org/mozilla-central/rev/8567eb45819a
https://hg.mozilla.org/mozilla-central/rev/4a0c57aceb12
https://hg.mozilla.org/mozilla-central/rev/299625448252
Description
•