[PATCH] D115050: [clang-format] PR48916 PointerAlignment not working when using C++20 init-statement in for loop

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 8 01:38:48 PST 2021


curdeius added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:1947
   verifyFormat("int&& c = f3();", Style);
+  verifyFormat("for (auto a = 0, b = 0; const auto& c : {1, 2, 3})", Style);
 
----------------
curdeius wrote:
> How about pointers/references in the init? Also, please test sth else than auto, both in init and as the loop variable.
I think that you're still missing non-auto variable declarations in init. Also, you can add a statement not being a variable declaration in the init.


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

https://reviews.llvm.org/D115050



More information about the cfe-commits mailing list