[PATCH] D152443: Add SpaceAfterOperatorKeyword & SpaceAfterOperatorKeywordInCall style options for clang-format
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 9 08:52:09 PDT 2023
MyDeveloperDay added inline comments.
================
Comment at: clang/docs/ClangFormatStyleOptions.rst:4709
+
+**SpaceAfterOperatorKeyword** (``Boolean``) :versionbadge:`clang-format 17` :ref:`¶ <SpaceAfterOperatorKeyword>`
+ If ``true``, a space will be inserted after the 'operator' keyword.
----------------
could we use something like `SpaceAfterOperatorDeclaration` to differentiate
================
Comment at: clang/docs/ClangFormatStyleOptions.rst:4719
+
+**SpaceAfterOperatorKeywordInCall** (``Boolean``) :versionbadge:`clang-format 17` :ref:`¶ <SpaceAfterOperatorKeywordInCall>`
+ If ``true``, a space will be inserted after the 'operator' keyword in a call expression.
----------------
I'm not going to lie I'm not a fan of `SpaceAfterOperatorKeywordInCall` as an option name, any other suggestions for a name?
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3762
}
+
// co_await (x), co_yield (x), co_return (x)
----------------
kind of unrelated change?
================
Comment at: clang/unittests/Format/FormatTest.cpp:22916
+ Style.SpaceAfterOperatorKeywordInCall = true;
+ verifyFormat("foo.operator ==();", Style);
+ verifyFormat("foo.Foo::operator ==();", Style);
----------------
I assume I could have `foo->operator ==();`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152443/new/
https://reviews.llvm.org/D152443
More information about the cfe-commits
mailing list