Page MenuHomePhabricator Dev

Bug 1387052 - Make Firefox code worse intentionally 2/2.
Needs ReviewPublic

Authored by janx on Nov 21 2018, 2:03 PM.
Tags
None
Referenced Files
F67106549: D841.1792493909.diff
Mon, Oct 19, 10:58 AM
Unknown Object (File)
Thu, Oct 8, 4:25 PM
Unknown Object (File)
Jul 22 2026, 6:54 AM
Unknown Object (File)
Jul 21 2026, 7:49 PM
Unknown Object (File)
Jun 6 2026, 7:15 AM
Unknown Object (File)
May 29 2026, 9:24 PM
Unknown Object (File)
Apr 8 2026, 5:20 AM
Unknown Object (File)
Apr 7 2026, 9:40 AM
Subscribers
None

Details

Reviewers
ReviewBot
Bugzilla Bug ID
1387052
Summary

Depends on D840

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Branch
HEAD

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Nov 21 2018, 2:03 PM
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: Restricted Project.
janx requested review of this revision.Nov 21 2018, 2:03 PM

Code analysis found 6 defects in this patch:

  • 6 defects found by clang-tidy

You can run this analysis locally with:

  • ./mach static-analysis check path/to/file.cpp (C/C++)

If you see a problem in this automated review, please report it here: https://bit.ly/2IyNRy2

js/src/jsapi.cpp
237

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

B() {} // after: modernize-use-equals-default
^   ~~
    = default;
238

Warning: Use '= default' to define a trivial copy constructor [clang-tidy: modernize-use-equals-default]

B(const B&) {} // after: modernize-use-equals-default
^           ~~
            = default;
239

Warning: Move constructors should be marked noexcept [clang-tidy: performance-noexcept-move-constructor]

B(B &&) {} // after: performance-noexcept-move-constructor
^
244

Warning: Use '= default' to define a trivial copy constructor [clang-tidy: modernize-use-equals-default]

D(const D &RHS) : B(RHS) {} // after: modernize-use-equals-default
^
245

Warning: Move constructors should be marked noexcept [clang-tidy: performance-noexcept-move-constructor]

D(D &&RHS) : B(RHS) {} // after: performance-move-constructor-init; performance-noexcept-move-constructor
^
245

Warning: Move constructor initializes base class by calling a copy constructor [clang-tidy: performance-move-constructor-init]

D(D &&RHS) : B(RHS) {} // after: performance-move-constructor-init; performance-noexcept-move-constructor
             ^

Code analysis found 6 defects in this patch:

  • 6 defects found by clang-tidy

You can run this analysis locally with:

  • ./mach static-analysis check path/to/file.cpp (C/C++)

For your convenience, here is a patch that fixes all the clang-format defects: https://queue.taskcluster.net/v1/task/JZeKjbpfR-O3FQahOFgqog/runs/0/artifacts/public/results/clang-format-PHID-DIFF-ubnca77a6jsibs3nf5yn.diff (use it in your repository with hg import or git apply)

If you see a problem in this automated review, please report it here: https://bit.ly/2IyNRy2

js/src/jsapi.cpp
237

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

B() {} // after: modernize-use-equals-default
^   ~~
    = default;
238

Warning: Use '= default' to define a trivial copy constructor [clang-tidy: modernize-use-equals-default]

B(const B&) {} // after: modernize-use-equals-default
^           ~~
            = default;
239

Warning: Move constructors should be marked noexcept [clang-tidy: performance-noexcept-move-constructor]

B(B &&) {} // after: performance-noexcept-move-constructor
^
244

Warning: Use '= default' to define a trivial copy constructor [clang-tidy: modernize-use-equals-default]

D(const D &RHS) : B(RHS) {} // after: modernize-use-equals-default
^
245

Warning: Move constructors should be marked noexcept [clang-tidy: performance-noexcept-move-constructor]

D(D &&RHS) : B(RHS) {} // after: performance-move-constructor-init; performance-noexcept-move-constructor
^
245

Warning: Move constructor initializes base class by calling a copy constructor [clang-tidy: performance-move-constructor-init]

D(D &&RHS) : B(RHS) {} // after: performance-move-constructor-init; performance-noexcept-move-constructor
             ^