[clang] [clang-format] revert to string << string handling to previous default (PR #88490)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 13 03:42:30 PDT 2024
================
@@ -2193,6 +2193,41 @@ struct FormatStyle {
/// \version 3.7
bool BreakBeforeTernaryOperators;
+ /// Different ways to Break Between Chevrons.
+ enum BreakChevronOperatorStyle : int8_t {
+ /// Break using ColumnLimit rules.
+ /// \code
+ /// os << "aaaaa" << "bbbbb" << "\n";
+ /// \endcode
+ BCOS_Never,
+ /// Break between adjacent strings.
+ /// \code
+ /// os << "aaaaa"
+ /// << "bbbbb"
+ /// << "\n";
+ /// \endcode
+ BCOS_BetweenStrings,
+ /// Break between adjacent strings that end with \n.
+ /// \code
+ /// os << "aaaaa\n"
+ /// << "bbbbb" << "ccccc\n"
+ /// << "\n";
+ /// \endcode
+ BCOS_BetweenNewlineStrings,
+ /// Break between adjacent chevrons.
+ /// \code
+ /// os << "aaaaa\n"
+ /// << "bbbbb"
+ /// << "ccccc\n"
+ /// << "\n";
+ /// \endcode
+ BCOS_Always
+ };
+
+ /// Break Between Chevron Operators
+ /// \version 19
+ BreakChevronOperatorStyle BreakChevronOperator;
----------------
mydeveloperday wrote:
So later commit in the PR do >> as well as << so maybe just BreakStreamOperator? WDYT
https://github.com/llvm/llvm-project/pull/88490
More information about the cfe-commits
mailing list