Open
Description
AlignArrayOfStructures: None
behaves bizarrely, doing more "alignment" IMO than Left or Right does.
None:
const std::vector<Vertex> vertices = { { { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f } },
{ { 0.5f, -0.5f }, { 0.0f, 1.0f, 0.0f } },
{ { 0.5f, 0.5f }, { 0.0f, 0.0f, 1.0f } },
{ { -0.5f, 0.5f }, { 1.0f, 1.0f, 1.0f } } };
Left:
const std::vector<Vertex> vertices = {
{ { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f } },
{ { 0.5f, -0.5f }, { 0.0f, 1.0f, 0.0f } },
{ { 0.5f, 0.5f }, { 0.0f, 0.0f, 1.0f } },
{ { -0.5f, 0.5f }, { 1.0f, 1.0f, 1.0f } }
};
Expected behavior (but not possible with current clang-format, as far as I can tell):
const std::vector<Vertex> vertices = {
{ { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f } },
{ { 0.5f, -0.5f }, { 0.0f, 1.0f, 0.0f } },
{ { 0.5f, 0.5f }, { 0.0f, 0.0f, 1.0f } },
{ { -0.5f, 0.5f }, { 1.0f, 1.0f, 1.0f } }
};
Additionally, in my actual setup where I use tabs, the alignment is totally broken.
For some reason it tries to use a mix of tabs and spaces to do the alignment, and gets it completely wrong. Not sure what it's expecting this tab to align with, but tabSize
is set to 4 in my config.

So, all three possible options for this setting are producing undesireable results.