Closed
Bug 1317305
Opened 9 years ago
Closed 9 years ago
Update clang format rules
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox53 fixed)
RESOLVED
FIXED
mozilla53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
Details
Attachments
(1 file)
No description provided.
| Comment hidden (mozreview-request) |
Comment 2•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8810380 [details]
Bug 1317305 - Update clang format rules
https://reviewboard.mozilla.org/r/92734/#review92720
I didn't check to make sure that you weren't missing any MacroBlockBegin macros which I have used (because I can't do that very well off of the top of my head).
::: .clang-format:10
(Diff revision 1)
> +
> +# Force pointers to the type for C++.
> +DerivePointerAlignment: false
> +PointerAlignment: Left
> +
> +# Prevent the lost of indentation with these macros
the loss of indentation
::: .clang-format:11
(Diff revision 1)
> +# Force pointers to the type for C++.
> +DerivePointerAlignment: false
> +PointerAlignment: Left
> +
> +# Prevent the lost of indentation with these macros
> +MacroBlockBegin: "^(NS_INTERFACE_MAP_BEGIN|NS_INTERFACE_TABLE_HEAD|NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION|NS_IMPL_CYCLE_COLLECTION_.*_BEGIN|NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED|NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED|NS_INTERFACE_TABLE_BEGIN|NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED|NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED)$"
Is there any way we could lay this out nicer in this file? I'm not sure what file formats are supported but it would be neat if it could have one macro per line, like:
NS_INTERFACE_MAP_BEGIN |
NS_INTERFACE_TABLE_HEAD |
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION |
...
Attachment #8810380 -
Flags: review?(michael) → review+
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 4•9 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8810380 [details]
Bug 1317305 - Update clang format rules
https://reviewboard.mozilla.org/r/92734/#review92720
> Is there any way we could lay this out nicer in this file? I'm not sure what file formats are supported but it would be neat if it could have one macro per line, like:
>
> NS_INTERFACE_MAP_BEGIN |
> NS_INTERFACE_TABLE_HEAD |
> NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION |
> ...
Great idea, I found the syntax in this bug https://llvm.org/bugs/show_bug.cgi?id=30656
and it is indeed much better!
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c4917d6cf776
Update clang format rules r=mystor
Comment 6•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
| Assignee | ||
Updated•9 years ago
|
status-firefox52:
affected → ---
Updated•8 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•