[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 9 15:02:24 PST 2025


================
@@ -274,15 +276,21 @@ class BreakableStringLiteral : public BreakableToken {
 protected:
   // The column in which the token starts.
   unsigned StartColumn;
-  // The prefix a line needs after a break in the token.
+  // The prefix a line needs at the start
   StringRef Prefix;
-  // The postfix a line needs before introducing a break.
+  // The postfix a line needs at the end
   StringRef Postfix;
+  // The prefix every line except the first line needs
+  StringRef ContinuationPrefix;
+  // The postfix every line except the last line needs
+  StringRef ContinuationPostfix;
   // The token text excluding the prefix and postfix.
   StringRef Line;
   // Length of the sequence of tokens after this string literal that cannot
   // contain line breaks.
   unsigned UnbreakableTailLength;
+  // Whether the string prefix and postfix should be repeated on each line
+  // when breaking the string.
----------------
HazardyKnusperkeks wrote:

Leftover?

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


More information about the cfe-commits mailing list