You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UseTab option is set to Always, but clang-format is using spaces to align the << operator in continued lines. This behavior occurs even when all the Align* options are set to false. Also BreakBeforeBinaryOperators has no influence on the alignment (or even breaking before/after) of the stream operator <<.
The unwanted leading spaces then trigger other format checkers like EditorConfig (which is set to indent_style·=·tab)
Steps to reproduce
Create a minimal .clang-format file with the following configuration:
The issue #44363 is somewhat related to this issue. It describes a not configurable and in some cases unwanted behavior when it comes to stream operators and breaking lines.
the problem occurred while checking for the correctness of the break after binary operators.
The output statement 'tok::lessless' is then break line every possible time,
which is not expected with the BreakBeforeBinaryOperators: None
Fixesllvm#59797Fixesllvm#44363
Description
The
UseTab
option is set toAlways
, but clang-format is using spaces to align the<<
operator in continued lines. This behavior occurs even when all theAlign*
options are set tofalse
. AlsoBreakBeforeBinaryOperators
has no influence on the alignment (or even breaking before/after) of the stream operator<<
.The unwanted leading spaces then trigger other format checkers like EditorConfig (which is set to
indent_style·=·tab
)Steps to reproduce
.clang-format
file with the following configuration:Expected behavior
The
<<
operators in the continued lines should not be aligned and only be indented with tab characters, not with spaces:Actual behavior
The
<<
operators in the continued lines are indented with three tabs and with two additional spaces for alignment:Environment
Debian clang-format version 14.0.6
The text was updated successfully, but these errors were encountered: