[clang] [clang-format] Don't always break before << between string literals (PR #92214)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Fri May 24 19:46:35 PDT 2024


================
@@ -10539,6 +10539,17 @@ TEST_F(FormatTest, KeepStringLabelValuePairsOnALine) {
       "                  bbbbbbbbbbbbbbbbbbbbbbb);");
 }
 
+TEST_F(FormatTest, WrapBeforeInsertionOperatorbetweenStringLiterals) {
+  verifyFormat("QStringList() << \"foo\" << \"bar\";");
----------------
owenca wrote:

No, because the single-argument version of `verifyFormat` is a more stringent test than `verifyNoChange` as the former also tests the input with all optional whitespace characters between tokens removed.

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


More information about the cfe-commits mailing list