[clang-format] Fix AlignArrayOfStructures + Cpp11BracedListStyle=false
Currently AlignArrayOfStructures=Left is hard coding setting Spaces to 0 for the token following the initial opening brace, but not touching Spaces for the subsequent lines, which leads to the array being misaligned. Additionally, it's not adding a space before the trailing } which is generally done when Cpp11BracedListStyle=false. I'm not exactly sure why this function needs to override the Spaces as it seems to generally already be set to either 0 or 1 according to the other formatting settings, but I'm going with an explicit fix where I just force the padding to 1 when Cpp11BracedListStyle=false. AlignArrayOfStructures=Right doesn't have any alignment problems, but isn't adding the expected padding around the braces either, so I'm giving that the same treatment. Fixes #57611. Differential Revision: https://reviews.llvm.org/D158795
Loading
Please sign in to comment