[PATCH] D119650: [clang-format] Handle PointerAlignment in `if` statements with initializers (C++17) the same way as in `for` loops.

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 12 14:24:09 PST 2022


owenpan accepted this revision.
owenpan added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:31
+/// with an initializer.
+static bool startsWithStatementWithInitializer(const AnnotatedLine &Line) {
+  return Line.startsWith(tok::kw_for) || Line.startsWith(tok::kw_if);
----------------
Nit: rename the function to `...WithInit`, `...WithInitStmt`, or `...WithInitStatement`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119650



More information about the cfe-commits mailing list