bdunkin wrote: > I have to quote this, because I think this is an uncommon formatting style, > with many possible ways to expect something different from the output. It > also violates (although documented) the `ColumnLimit`.
I do not see this as a _new_ formatting style, but as something that allows more formatting consistency with the existing options available. Similarly to how `AcrossComments` allows consistent alignment when there are comments on separate lines between things, this option allows consistent alignment when there are trailing comments between things. Is there a style guide that specifically states that declarations should be aligned across line comments in between? If not, perhaps a different standard should be applied here. Although, the only standard that isn't satisfied here would be a public style guide since my company does not provide source code publicly, and thus does not publish its coding style guide. Would limiting this to only declarations change your thinking here? I figured there wasn't anything special in the code that would limit this option to only declarations, so I didn't, but my motivating use case is only for declarations like the examples given. > Let me ask, do you really need trailing comments, can't you just put the > comments on their own line? We are formatting large amounts of existing code, and generally clang-format's alignment options work just fine except in the presences of trailing comments. Moving these comments to their own line would be a prohibitive amount of work. https://github.com/llvm/llvm-project/pull/190668 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
