owenca wrote:

Please see 
https://github.com/llvm/llvm-project/issues/88483#issuecomment-2053928993 and 
Conversation in #69859, which was the first attempt at adding an option for 
breaking consecutive stream insertion operations. Instead of handling 
everything specified in 
https://github.com/llvm/llvm-project/pull/69859#issuecomment-1776064714 in a 
single patch, we can take a few steps:

1. Handle when to break _before_ `<<`. The current default (since 18.x) is only 
when the left operand is a string literal ending with a newline and the right 
operand is a string literal.
2. Handle whether to indent or align after the break.
3. Do the above for breaking breaking _after_ `<<`.

(Ditto for stream extraction operations if needed.)

For No. 1 above, an `enum` option (e.g. `BreakBeforeStreamInsertionOperator`) 
with `Leave`, `AfterNewline` (LLVM default), `Always`, and `Never` may be 
sufficient. @s1Sharp

https://github.com/llvm/llvm-project/pull/88490
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to