[PATCH] D27651: [clang-format] Even with AlignConsecutiveDeclarations, PointerAlignment: Right should keep *s and &s to the right
Ken-Patrick Lehrmann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 9 09:31:03 PST 2017
KP updated this revision to Diff 83639.
KP added a comment.
Thanks Beren.
No problem for me to rebase once https://reviews.llvm.org/D21279 is merged.
I've added test cases for PAS_Middle and PAS_Left, I'm a bit surprised with some of the results (although it is not impacted by my changes).
With PAS_Middle and PAS_Left, I get:
void SomeFunction(int parameter = 0) {
int const i = 1;
int ** j = 2, ***k = 3;
int big = 10000;
I would have expected with PAS_Middle:
int ** j = 2, *** k = 3;
and with PAS_Left:
int** j = 2, *** k = 3;
Am I right ?
IIUC it is some bug/limitation in PAS_Left and Middle.
https://reviews.llvm.org/D27651
Files:
lib/Format/WhitespaceManager.cpp
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27651.83639.patch
Type: text/x-patch
Size: 9750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170109/9d4fcf18/attachment-0001.bin>
More information about the cfe-commits
mailing list