owenpan added inline comments.
================ Comment at: clang/lib/Format/TokenAnnotator.cpp:2375-2378 + const FormatToken *Prev = PrevToken; + if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) && + Prev->is(tok::l_square) && (Prev = Prev->getPreviousNonComment()) && + Prev->is(tok::kw_delete)) ---------------- `endsSequence()` is exactly what you want here. ;) ================ Comment at: clang/unittests/Format/FormatTest.cpp:10538 + Style.PointerAlignment = FormatStyle::PAS_Right; + verifyFormat("delete[] *ptr;", Style); ---------------- A typo? ================ Comment at: clang/unittests/Format/FormatTest.cpp:10541 + verifyFormat("delete[] **ptr;", Style); + verifyFormat("delete[] *(ptr);", Style); + ---------------- MyDeveloperDay wrote: > could you cover the other PointerAlignment case for completeness IMO, testing only `PAS_Left` would suffice as we just want to ensure that no spaces are added after the `*`s. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132911/new/ https://reviews.llvm.org/D132911 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits