samedi 18 décembre 2021

Is there any options to make clang-format produce the following effect?

I use clang-format to format the following code, but the effect is not what I want:

void f(int, int, std::vector<int>, std::map<int, int>)
{}

int main()
{
    f(
        {
    },
        {}, {1, 2, 3},
        {
            {1, 2},
            {3, 4},
        });
}

Is there any options to make clang-format produce the following effect?

void f(int, int, std::vector<int>, std::map<int, int>)
{}

int main()
{
    f({}, 
      {}, 
      {1, 2, 3},
      {
          {1, 2},
          {3, 4},
      });
}

Aucun commentaire:

Enregistrer un commentaire