[PATCH] D115769: [clang-format] Remove spurious JSON binding when DisableFormat = true

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 15 00:25:33 PST 2021


MyDeveloperDay added a comment.

The following will show the issue

  TEST_F(FormatTestJson, DisableJsonFormat) {
    FormatStyle Style = getLLVMStyle(FormatStyle::LK_Json);
    verifyFormat("{}", Style);
    verifyFormat("{\n"
                 "  \"name\": 1\n"
                 "}",
                 Style);
    Style.DisableFormat = true;
    verifyFormat("{}", Style);
    verifyFormat("{\n"
                 "  \"name\": 1\n"
                 "}",
                 Style);
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115769



More information about the cfe-commits mailing list