[clang] [clang-format] Change SpaceAfterLogicalNot to enumeration type (PR #150166)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 23 01:14:09 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 ``!``.
----------------
HazardyKnusperkeks wrote:
```suggestion
/// Always insert a space after ``!``, but never after ``not``.
```
https://github.com/llvm/llvm-project/pull/150166
More information about the cfe-commits
mailing list