[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 01:05:02 PDT 2023


MyDeveloperDay added inline comments.


================
Comment at: clang/unittests/Format/FormatTestCSharp.cpp:221
 TEST_F(FormatTestCSharp, CSharpFatArrows) {
-  verifyFormat("Task serverTask = Task.Run(async() => {");
+  verifyIncompleteFormat("Task serverTask = Task.Run(async() => {");
   verifyFormat("public override string ToString() => \"{Name}\\{Age}\";");
----------------
not sure what changing here and why?


================
Comment at: clang/unittests/Format/FormatTestJS.cpp:1575
+               "    /xxxxxxxx xxxxxxxx/;",
+               getGoogleJSStyleWithColumns(18));
 }
----------------
out of interest what happens with  `<backtick>xxxxxx ${variable} xxxxxx<backtick>` type strings? can we add a test to show we won't break in the middle of a ${vas} even though the column limit might be reached?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154093



More information about the cfe-commits mailing list