-
Notifications
You must be signed in to change notification settings - Fork 15k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorclang-format
Description
clang-format 12, 13.0.1 and 14 format structs depending on their struct name.
Rect is formatted as expected/desired, but for RECT and R the noexcept of the constructor is put on the next line. It is not clear why RECT and R are handled differently than Rect.
Here is my C++ code.
struct Rect {
Rect() noexcept;
};
struct RECT {
RECT()
noexcept;
};
struct R {
R()
noexcept;
};And here is the content of my with .clang-format.
AccessModifierOffset: -4
AlignConsecutiveAssignments: AcrossComments
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: true
AlignOperands: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
BraceWrapping:
AfterExternBlock: true
AfterFunction: true
BeforeCatch: true
BeforeElse: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ColumnLimit: 0
Cpp11BracedListStyle: false
IndentGotoLabels: false
IndentPPDirectives: BeforeHash
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 5
NamespaceIndentation: All
PointerAlignment: Left
ReflowComments: false
SpaceBeforeSquareBrackets: false
SpacesBeforeTrailingComments: 3
SpacesInConditionalStatement: false
TabWidth: 4
UseTab: trueMetadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorclang-format