[PATCH] D124589: [clang-format] Fix a bug that misformats Access Specifier after *[]

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 1 13:09:24 PDT 2022


owenpan added a comment.

Now that we look ahead instead of looking back, it doesn't matter what comes before `*[]` or `[]`.



================
Comment at: clang/unittests/Format/FormatTest.cpp:3342
+               "public:\n"
+               "  std::unique_ptr<int *[]> b() { return nullptr; }\n"
+               "\n"
----------------
curdeius wrote:
> How about `int const *`, `const int*`? Is `const` & co. a simple type specifier?
It doesn't matter what comes before `*[]` now that we look ahead for a `>`.


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

https://reviews.llvm.org/D124589



More information about the cfe-commits mailing list