[PATCH] D27651: [clang-format] Even with AlignConsecutiveDeclarations, PointerAlignment: Right should keep *s and &s to the right

Beren Minor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 09:39:24 PST 2017


berenm added a comment.

Yes you are right,

I believe it's happening for comma-separated declaration list. I think the algorithm tries to keep it clear that the pointer / reference marks are for each declared identifier and not part of the common type.

I think that splitting the declarations for the Left and Middle test cases would be better so it actually verifies that the pointer marks are aligned as expected. Also, maybe add a bunch of references and rvalue refs to the test cases so that the tests are exhaustive.

Thanks!


https://reviews.llvm.org/D27651





More information about the cfe-commits mailing list