[PATCH] D94955: [clang-format] Treat ForEachMacros as loops

Jiashu Zou via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 25 20:51:22 PST 2021


GoBigorGoHome added a comment.





================
Comment at: clang/unittests/Format/FormatTest.cpp:995
 TEST_F(FormatTest, ForEachLoops) {
   verifyFormat("void f() {\n"
+               "  foreach (Item *item, itemlist) {\n"
----------------
MyDeveloperDay wrote:
> I'd like you to assert that short loops are off
You mean make sure that `AllowShortLoopsOnASingleLine` is false?
The default style of `verifyFormat` is LLVM style where `AllowShortLoopsOnASingleLine` is already false.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94955



More information about the cfe-commits mailing list