[clang] [clang-format] adds a space after not inside macros (PR #78176)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 4 14:45:27 PST 2024


================
@@ -4842,7 +4842,7 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
     return true;
   }
   if (Left.is(TT_UnaryOperator)) {
-    if (Right.isNot(tok::l_paren)) {
+    if (!Right.isOneOf(tok::r_paren, tok::l_paren, tok::exclaim)) {
----------------
zygoloid wrote:

Another data point: the [Python style guide](https://peps.python.org/pep-0008/#other-recommendations) also recommends always putting a space after `not`.

https://github.com/llvm/llvm-project/pull/78176


More information about the cfe-commits mailing list