https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/70360
This patch addresses some example of bad formatting in Clang. The following
commit contains only changes suggested by clang-format:
https://github.com/llvm/llvm-project/pull/70349/commits/21689b56d1fc1db0b2263e8
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Vlad Serebrennikov (Endilll)
Changes
This patch addresses some example of bad formatting in Clang. The following
commit contains only changes suggested by clang-format:
https://github.com/llvm/llvm-project/pull/70349/commits/21689b
AaronBallman wrote:
I'm in favor of these changes. The current formatting makes some pretty bad
decisions in places, but I think it's a hard problem to solve -- some
attributes are longer and may want to be on their own line, other attributes
are shorter and maybe are reasonable to inline, but
owenca wrote:
This would change the default for every other predefined style, which might be
ok if there's no mention of breaking after C++11 attributes in those styles.
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Endilll wrote:
[Mozilla](https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html),
[WebKit](https://webkit.org/code-style-guidelines/),
[GCC](https://gcc.gnu.org/codingconventions.html#Cxx_Conventions),
[Microsoft](https://learn.microsoft.com/en-us/dotnet/csharp
owenca wrote:
> [Google](https://google.github.io/styleguide/cppguide.html) is the only one
> mentioning attributes:
>
> > Attributes, and macros that expand to attributes, appear at the very
> > beginning of the function declaration or definition, before the return type:
> > ```c++
> > ABSL_
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -794,6 +794,7 @@ clang-format
- Add ``AllowBreakBeforeNoexceptSpecifier`` option.
- Add ``AllowShortCompoundRequirementOnASingleLine`` option.
+- Change ``BreakAfterAttributes`` from ``Never`` to ``Leave`` in LLVM style
owenca wrote:
Full stop
@@ -26179,7 +26179,7 @@ TEST_F(FormatTest, RemoveSemicolon) {
TEST_F(FormatTest, BreakAfterAttributes) {
FormatStyle Style = getLLVMStyle();
- EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Never);
+ EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Leave);
--
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/70360
>From 3866a77d62a34e612ff869cde7c743e31350eed2 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 26 Oct 2023 20:41:25 +0300
Subject: [PATCH 1/2] [clang-format] Change LLVM style to BreakAfterAttributes
@@ -26179,7 +26179,7 @@ TEST_F(FormatTest, RemoveSemicolon) {
TEST_F(FormatTest, BreakAfterAttributes) {
FormatStyle Style = getLLVMStyle();
- EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Never);
+ EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Leave);
--
@@ -794,6 +794,7 @@ clang-format
- Add ``AllowBreakBeforeNoexceptSpecifier`` option.
- Add ``AllowShortCompoundRequirementOnASingleLine`` option.
+- Change ``BreakAfterAttributes`` from ``Never`` to ``Leave`` in LLVM style
Endilll wrote:
Fixed.
h
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mydeveloperday approved this pull request.
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
17 matches
Mail list logo