[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 11:22:09 PDT 2023


HazardyKnusperkeks wrote:

> yes, issue with breaking after << is gone. I want to get your point about functionality clang-format and implementing new option such as "BreakAfterStreamOperator". As i can see, @HazardyKnusperkeks you agree with "owenca" point?
> 
> May be i can do something with this feature

You are welcome to try. I'd go with the name `BreakAfterOperatorLessLess`. You need:

- [ ] The definition in `FormatStyle.h`.
- [ ] The documentation. (Run `clang/doc/tools/dump_format_style.py`)
- [ ] The parsing.
- [ ] The default value for `LLVMStyle` which does not change any current behavior.
- [ ] Tests which show various combinations of the option, with comments, and long lines.
- [ ] Consider the interaction with `BreakBeforeBinaryOperators`.

You can of course start with documentation and/or tests to show how you think it will work, even if you did not try to implement it.

https://github.com/llvm/llvm-project/pull/69859


More information about the cfe-commits mailing list