@@ -1639,6 +1641,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind
Language) {
LLVMStyle.SpaceAfterCStyleCast = false;
LLVMStyle.SpaceAfterLogicalNot = false;
LLVMStyle.SpaceAfterTemplateKeyword = true;
+ LLVMStyle.SpaceAfterOperatorKeyword = false;
--
@@ -1153,6 +1153,8 @@ template <> struct MappingTraits {
IO.mapOptional("SpaceAfterLogicalNot", Style.SpaceAfterLogicalNot);
IO.mapOptional("SpaceAfterTemplateKeyword",
Style.SpaceAfterTemplateKeyword);
+IO.mapOptional("SpaceAfterOperatorKeyword",
@@ -5433,6 +5441,7 @@ struct FormatStyle {
SpaceAfterCStyleCast == R.SpaceAfterCStyleCast &&
SpaceAfterLogicalNot == R.SpaceAfterLogicalNot &&
SpaceAfterTemplateKeyword == R.SpaceAfterTemplateKeyword &&
+ SpaceAfterOperatorKeyword == R
https://github.com/MightyFilipns updated
https://github.com/llvm/llvm-project/pull/137610
>From 9b1b940c23e53591dd4234d789fc44720e220554 Mon Sep 17 00:00:00 2001
From: MightyFilipns
Date: Mon, 28 Apr 2025 11:54:20 +0200
Subject: [PATCH] clang-format: Add SpaceAfterOperatorKeyword option
---
c
https://github.com/MightyFilipns edited
https://github.com/llvm/llvm-project/pull/137610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17630,6 +17630,13 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
verifyFormat("int x = int (y);", SomeSpace2);
verifyFormat("auto lambda = []() { return 0; };", SomeSpace2);
+ FormatStyle SpaceAfterOperatorKeyword = getLLVMStyle();
+ SpaceAfterOperatorKeyword
@@ -4471,6 +4471,14 @@ struct FormatStyle {
/// \version 4
bool SpaceAfterTemplateKeyword;
+ /// If \c true, a space will be inserted after the ``operator`` keyword.
+ /// \code
+ ///true:false:
+ ///bool operator == (int a)
https://github.com/MightyFilipns updated
https://github.com/llvm/llvm-project/pull/137610
>From ea19ffc6fd470d39d51dee7b5eb33178c023b246 Mon Sep 17 00:00:00 2001
From: MightyFilipns
Date: Mon, 28 Apr 2025 11:54:20 +0200
Subject: [PATCH] clang-format: Add SpaceAfterOperatorKeyword option
---
c
https://github.com/MightyFilipns updated
https://github.com/llvm/llvm-project/pull/137610
>From 2602b45c8d334b49e38998273e281f3b372a246a Mon Sep 17 00:00:00 2001
From: MightyFilipns
Date: Mon, 28 Apr 2025 11:54:20 +0200
Subject: [PATCH] clang-format: Add SpaceAfterOperatorKeyword option
---
c
https://github.com/MightyFilipns updated
https://github.com/llvm/llvm-project/pull/137610
>From 169633c6bc571ce8fcc58a5e796398c8007e97b4 Mon Sep 17 00:00:00 2001
From: MightyFilipns
Date: Mon, 28 Apr 2025 11:54:20 +0200
Subject: [PATCH 1/2] clang-format: Add SpaceAfterOperatorKeyword option
--
10 matches
Mail list logo