Add braces & newlines to cases where clang-format unwrapped a return statement to same line as its logic, in layout/svg.

RESOLVED FIXED in Firefox 66

Status

()

enhancement
P4
normal
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

6 months ago
We had a number of cases in layout/svg with old code of the form:
   if (condition)
     return;

...which clang-format unwrapped to:
   if (condition) return;

...which is suboptimal from a readability and debuggability standpoint (e.g. you can't set a breakpoint on the return statement).

Filing this bug on cleaning those up (by adding braces around the return statement so that clang-format is OK with it being on its own line).

(did this as some nice mindless/offline work while on a long flight yesterday.)
Assignee

Comment 1

6 months ago
This patch shouldn't affect behavior; it's just making the existing control
flow clearer and more debuggable.
Assignee

Updated

6 months ago
Blocks: 1513393

Comment 2

6 months ago
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8bf181f9b1c3
Add braces & newlines to re-wrap some return statements that clang-format unwrapped, in layout/svg. r=heycam

Comment 3

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8bf181f9b1c3
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.