[PATCH] D154091: [clang-format] Recognize escape sequences when breaking strings

sstwcw via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 1 08:31:06 PDT 2023


sstwcw marked 2 inline comments as done.
sstwcw added inline comments.


================
Comment at: clang/lib/Format/BreakableToken.cpp:223
 
-  if (SpaceOffset != 0)
-    return BreakableToken::Split(SpaceOffset + 1, 0);
+  if (NewLine != 0)
+    return BreakableToken::Split(NewLine, 0);
----------------
HazardyKnusperkeks wrote:
> What if the new line is after the limit?
Then the loop will exit on line 197.  I added a test for it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154091/new/

https://reviews.llvm.org/D154091



More information about the cfe-commits mailing list