rmarker wrote:
> > > @mydeveloperday @HazardyKnusperkeks @rymiel this patch fixes a very old
> > > bug and will cause behavior changes whether the default is changed to the
> > > new `AllowShortType` or left at `None`. Which way should we go?
> >
> >
> > Now I'm leaning toward keeping the
https://github.com/rmarker updated
https://github.com/llvm/llvm-project/pull/78011
>From a1312a0a463bb946f336977b5b01ef7afbede678 Mon Sep 17 00:00:00 2001
From: rmarker
Date: Thu, 11 Jan 2024 15:01:18 +1030
Subject: [PATCH 1/9] [clang-format] Add ShortReturnTypeColumn option.
---
HazardyKnusperkeks wrote:
> @mydeveloperday @HazardyKnusperkeks @rymiel this patch fixes a very old bug
> and will cause behavior changes whether the default is changed to the new
> `AllowShortType` or left at `None`. Which way should we go?
What would change if the default was kept at
@@ -474,7 +474,7 @@ class State:
opts = sorted(opts, key=lambda x: x.name)
options_text = "\n\n".join(map(str, opts))
-with open(DOC_FILE) as f:
+with open(DOC_FILE, encoding="utf-8") as f:
HazardyKnusperkeks wrote:
Unrelated.
@@ -922,8 +922,23 @@ struct FormatStyle {
/// };
/// int f();
/// int f() { return 1; }
+/// int f::
+/// bar();
/// \endcode
RTBS_None,
+/// Break after return
@@ -922,8 +922,23 @@ struct FormatStyle {
/// };
/// int f();
/// int f() { return 1; }
+/// int f::
+/// bar();
/// \endcode
RTBS_None,
+/// Break after return
@@ -587,7 +590,7 @@ bool ContinuationIndenter::mustBreak(const LineState
) {
!State.Line->ReturnTypeWrapped &&
// Don't break before a C# function when no break after return type.
(!Style.isCSharp() ||
- Style.AlwaysBreakAfterReturnType !=
rmarker wrote:
Updated FormatTests to account for the change to the style.
(Forgetting them is what I get for coding late).
This should help when evaluating the scope of the change.
https://github.com/llvm/llvm-project/pull/78011
___
cfe-commits
https://github.com/rmarker updated
https://github.com/llvm/llvm-project/pull/78011
>From a1312a0a463bb946f336977b5b01ef7afbede678 Mon Sep 17 00:00:00 2001
From: rmarker
Date: Thu, 11 Jan 2024 15:01:18 +1030
Subject: [PATCH 1/8] [clang-format] Add ShortReturnTypeColumn option.
---