[PATCH] D108810: [clang-format] [PR51640] - New AfterEnum brace wrapping changes have cause C# behaviour to change

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 27 04:38:09 PDT 2021


owenpan added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3788-3790
+        if (Line.First && Line.First->Next &&
+            Line.First->isOneOf(Keywords.kw_internal, tok::kw_public,
+                                tok::kw_private, tok::kw_protected) &&
----------------
Nit: can you add a boolean above the outer `if` so that it can be used in the `if` below?

Also, `Line.First` is inconsistent with `Line.startsWith` elsewhere? I think the latter skips leading comments.


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

https://reviews.llvm.org/D108810



More information about the cfe-commits mailing list