curdeius added inline comments.
================ Comment at: clang/docs/ClangFormatStyleOptions.rst:3115 +**JsonMultilineArrays** (``Boolean``) :versionbadge:`clang-format 16` + If ``true``, clang-format will always break after a Json array `[` ---------------- Why limiting to JSON only? Could we name it in a general fashion (we comment that it's JSON only for the time being). I believe it may be an interesting option for various languages. How about BreakMultilineArrays, or just BreakArrays to follow the naming of existing options a bit? ================ Comment at: clang/lib/Format/TokenAnnotator.cpp:4413 + while (Tok) { + if (Tok->isOneOf(tok::l_brace, tok::l_square)) { + return true; ---------------- Please elide braces in the ifs. ================ Comment at: clang/lib/Format/TokenAnnotator.cpp:4427 + if (Left.is(tok::comma)) { + if (Right.is(tok::l_brace)) { + return true; ---------------- You can elide braces here. ================ Comment at: clang/lib/Format/TokenAnnotator.cpp:4434 + while (Tok) { + if (Tok->isOneOf(tok::l_brace, tok::l_square)) { + return true; ---------------- You might elide braces in both ifs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133589/new/ https://reviews.llvm.org/D133589 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits