HazardyKnusperkeks added inline comments.

================
Comment at: clang/lib/Format/BreakableToken.cpp:818-822
         const auto AllowsSpaceChange =
-            SpacesInPrefix != 0 ||
-            (!NoSpaceBeforeFirstCommentChar() ||
-             (FirstNonSpace == '}' && FirstLineSpaceChange != 0));
+            (!LineTok || !switchesFormatting(*LineTok)) &&
+            (SpacesInPrefix != 0 ||
+             (!NoSpaceBeforeFirstCommentChar() ||
+              (FirstNonSpace == '}' && FirstLineSpaceChange != 0)));
----------------
This slowly gets hard to read. Could you maybe split it up? Either in giving 
the multiple parts their own name. Or to keep the short circuiting have 
something like:
```
auto AllowsSpaceChange = ...;
AllowsSpaceChange = AllowsSpaceChange || ...;
AllowsSpaceChange = AllowsSpaceChange || ...;
```


================
Comment at: clang/unittests/Format/FormatTestComments.cpp:98
+                   "// clang-format on\n",
+                   getLLVMStyleWithColumns(20)));
+
----------------
Why the limit?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120188/new/

https://reviews.llvm.org/D120188

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to