[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2024-04-13 Thread Owen Pan via cfe-commits
owenca wrote: > I wish we'd made this removal an option rather than just removing it, what we > are seeing is reasonably formatted json or xml being streamed out is now > poorly written > > ```c++ > osjson << "{\n" ><<" \"name\": \"value\",\n" ><<" \"key\": \"abc\", \n" >

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2024-04-12 Thread via cfe-commits
mydeveloperday wrote: see #88483 https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2024-04-12 Thread via cfe-commits
mydeveloperday wrote: See #86893 88483 https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2024-04-09 Thread via cfe-commits
mydeveloperday wrote: I wish we'd made this removal an option rather than just removing it, what we are seeing is reasonably formatted json or xml being streamed out is now poorly written ```c++ osjson << "{\n" <<" \"name\": \"value\",\n" <<" \"key\": \"abc\", \n" <<"

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-27 Thread Owen Pan via cfe-commits
owenca wrote: IMO, the new behavior is consistent with the [documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#columnlimit) for `ColumnLimt: 0`. https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-26 Thread Petr Hosek via cfe-commits
petrhosek wrote: We have noticed that after this change, `clang-format` would behave differently depending on the input formatting. (I'm using `--style="{BasedOnStyle: google, ColumnLimit: 0}"` in the examples below.) For example, if the input is ``` return os << "ClientEnd<" <<

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-24 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/69871 >From d12aee14e9d588c402e69e49aa9b33be7f940acb Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 22 Oct 2023 01:36:17 -0700 Subject: [PATCH] [clang-format] Don't break between string literal operands of <<

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-23 Thread Owen Pan via cfe-commits
owenca wrote: > I think adding the possibility of breaking '<<' is a good idea if it's > optional, what do u think? +1, but see also https://github.com/llvm/llvm-project/pull/69859#issuecomment-1776064714. https://github.com/llvm/llvm-project/pull/69871

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-23 Thread Tsarkov Maksim via cfe-commits
s1Sharp wrote: I think adding the possibility of breaking '<<' is a good idea if it's optional, what do u think? https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-23 Thread Tsarkov Maksim via cfe-commits
s1Sharp wrote: this is good to be respectful. Please, lets check my mr https://github.com/llvm/llvm-project/pull/69859 also https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread Owen Pan via cfe-commits
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine , return true; if (Left.IsUnterminatedLiteral) return true; - if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) && owenca wrote: No, it still

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread Björn Schäpers via cfe-commits
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine , return true; if (Left.IsUnterminatedLiteral) return true; - if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) && HazardyKnusperkeks wrote:

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread Emilia Kond via cfe-commits
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine , return true; if (Left.IsUnterminatedLiteral) return true; - if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) && rymiel wrote:

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread Björn Schäpers via cfe-commits
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine , return true; if (Left.IsUnterminatedLiteral) return true; - if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) && HazardyKnusperkeks wrote:

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #44363. --- Full diff: https://github.com/llvm/llvm-project/pull/69871.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (-4) - (modified)

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-22 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/69871 Fixes #44363. >From fc955bc2730b52093d1e6d2bdd2dbf0400879edf Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 22 Oct 2023 01:36:17 -0700 Subject: [PATCH] [clang-format] Don't break between string literal