[clang] [clang-format] Change SpaceAfterLogicalNot to enumeration type (PR #150166)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 23 20:49:34 PDT 2025
================
@@ -4483,13 +4483,32 @@ struct FormatStyle {
/// \version 3.5
bool SpaceAfterCStyleCast;
- /// If ``true``, a space is inserted after the logical not operator (``!``).
- /// \code
- /// true: false:
- /// ! someExpression(); vs. !someExpression();
- /// \endcode
+ /// Space after logical not operator options.
+ enum SpaceAfterNotOptions : int8_t {
+ /// Never insert a space after ``!``.
+ /// \code
+ /// return !someExpression();
+ /// return not(a || b);
+ /// \endcode
+ SAN_Never,
+ /// Always insert a space after ``!``.
----------------
owenca wrote:
Ditto.
https://github.com/llvm/llvm-project/pull/150166
More information about the cfe-commits
mailing list