curdeius marked 5 inline comments as done.
curdeius added inline comments.

================
Comment at: clang/unittests/Format/FormatTest.cpp:2181-2185
+  EXPECT_EQ(Style.AllowShortBlocksOnASingleLine, FormatStyle::SBS_Never);
+  EXPECT_EQ(Style.AllowShortLoopsOnASingleLine, false);
   verifyFormat("void f() {\n"
-               "  foreach (Item *item, itemlist) {}\n"
-               "  Q_FOREACH (Item *item, itemlist) {}\n"
-               "  BOOST_FOREACH (Item *item, itemlist) {}\n"
+               "  for (;;) {\n"
+               "  }\n"
----------------
The existing tests have changed here. I added the tests case for a pure `for` 
loop to show the similarity.
I also check values of 
AllowShortBlocksOnASingleLine/AllowShortLoopsOnASingleLine.


================
Comment at: clang/unittests/Format/FormatTest.cpp:2226
+
+  FormatStyle ShortBlocks = getLLVMStyle();
+  ShortBlocks.ForEachMacros.push_back("rng");
----------------
Euuh, I might need to so come clean up here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94955

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

Reply via email to