diff options
author | Filip Milosevic <54005272+MightyFilipns@users.noreply.github.com> | 2025-05-08 07:47:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-07 22:47:56 -0700 |
commit | 5df01abe191ff4f848566e239798a2b4d26e1cf4 (patch) | |
tree | 7e036cf27b95ac6b192dd759536984bb31f00415 /clang/lib/Format/Format.cpp | |
parent | 26572bad95f816a979ce70b4e1335c8438a96df2 (diff) | |
download | llvm-5df01abe191ff4f848566e239798a2b4d26e1cf4.zip llvm-5df01abe191ff4f848566e239798a2b4d26e1cf4.tar.gz llvm-5df01abe191ff4f848566e239798a2b4d26e1cf4.tar.bz2 |
[clang-format] Add SpaceAfterOperatorKeyword option (#137610)
Add SpaceAfterOperatorKeyword option to clang-format
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 2f4b64e..20b5352 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1152,6 +1152,8 @@ template <> struct MappingTraits<FormatStyle> { IO.mapOptional("SortUsingDeclarations", Style.SortUsingDeclarations); IO.mapOptional("SpaceAfterCStyleCast", Style.SpaceAfterCStyleCast); IO.mapOptional("SpaceAfterLogicalNot", Style.SpaceAfterLogicalNot); + IO.mapOptional("SpaceAfterOperatorKeyword", + Style.SpaceAfterOperatorKeyword); IO.mapOptional("SpaceAfterTemplateKeyword", Style.SpaceAfterTemplateKeyword); IO.mapOptional("SpaceAroundPointerQualifiers", @@ -1639,6 +1641,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SortUsingDeclarations = FormatStyle::SUD_LexicographicNumeric; LLVMStyle.SpaceAfterCStyleCast = false; LLVMStyle.SpaceAfterLogicalNot = false; + LLVMStyle.SpaceAfterOperatorKeyword = false; LLVMStyle.SpaceAfterTemplateKeyword = true; LLVMStyle.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_Default; LLVMStyle.SpaceBeforeAssignmentOperators = true; |