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"
>
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
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
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"
<<" }"
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
cfe-com
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<"
<< "te
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
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
<<
Fixe
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
___
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
https://lists.llvm.org/cgi-bin/mai
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
https://lists.llvm.org/
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine
&Line,
return true;
if (Left.IsUnterminatedLiteral)
return true;
- if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) &&
owenca wrote:
No, it sti
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine
&Line,
return true;
if (Left.IsUnterminatedLiteral)
return true;
- if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) &&
HazardyKnusperkeks wrote:
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine
&Line,
return true;
if (Left.IsUnterminatedLiteral)
return true;
- if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) &&
rymiel wrote:
https://gi
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
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine
&Line,
return true;
if (Left.IsUnterminatedLiteral)
return true;
- if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) &&
HazardyKnusperkeks wrote:
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
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/unittests/Format/FormatTest.c
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 operan
19 matches
Mail list logo