sstwcw added a comment.

It won't break the string inside an escape sequence.  But escape sequences like 
`\040`, `\x20`, and `\u0020` don't get recognized as whitespace.



================
Comment at: clang/lib/Format/BreakableToken.cpp:199
 
+    if (EscapeSequence && Advance == 2) {
+      switch (Text[1]) {
----------------
MyDeveloperDay wrote:
> Can we add a unit test for escape sequences > \X which I assume this handles
There are already tests that verify that the string does not get broken inside 
an escape sequence in `BreaksWideAndNSStringLiterals` and 
`DoNotBreakStringLiteralsInEscapeSequence`.  And escape sequences longer than 1 
character following the backslash should not begin with one of these letters.  
So I don't see what tests I should add.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154091

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to