Open Bug 1511847 Opened 6 years ago Updated 2 years ago

clang-format wraps one-line macro with multiple comment lines unnecessarily

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: heycam, Unassigned)

Details

clang-format is doing something odd with macros that have a comment at the end of the line. For example it wants to do this: <<< --- a/layout/generic/ReflowInput.h +++ b/layout/generic/ReflowInput.h @@ -50,8 +50,9 @@ typedef uint32_t nsCSSFrameType; #define NS_CSS_FRAME_TYPE_BLOCK 2 // block-level in normal flow #define NS_CSS_FRAME_TYPE_FLOATING 3 #define NS_CSS_FRAME_TYPE_ABSOLUTE 4 -#define NS_CSS_FRAME_TYPE_INTERNAL_TABLE 5 // row group frame, row frame, - // cell frame, ... +#define NS_CSS_FRAME_TYPE_INTERNAL_TABLE \ + 5 // row group frame, row frame, + // cell frame, ... /** * Bit-flag that indicates whether the element is replaced. Applies to inline, >>> This doesn't happen if the second, aligned comment line is not present. It also doesn't happen on e.g. enum variants, even when there are two comment lines.
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.