Open
Bug 1338107
Opened 8 years ago
Updated 2 years ago
[clang-format] ? operator incorrectly indented by two spaces
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Developer Infrastructure
Lint and Formatting
Tracking
(Not tracked)
NEW
People
(Reporter: jya, Unassigned)
References
Details
Per Mozilla coding style:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Operators
operators are to be indented on the next line at the beginning (see bug 1338105)
This is also the case for the unary (?) operator.
"This applies to ?:"
As such it should be written as:
LOGV("%d audio samples demuxed (sid:%d)",
aSamples->mSamples.Length(),
aSamples->mSamples[0]->mTrackInfo
? aSamples->mSamples[0]->mTrackInfo->GetID()
: 0);
However, clang-format always indent by two characters the ? operator and it's written as:
LOGV("%d audio samples demuxed (sid:%d)",
aSamples->mSamples.Length(),
aSamples->mSamples[0]->mTrackInfo
? aSamples->mSamples[0]->mTrackInfo->GetID()
: 0);
which is incorrect.
Updated•8 years ago
|
Blocks: clang-format
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•6 years ago
|
Component: Source Code Analysis → Lint and Formatting
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•