[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
Sat Dec 10 01:59:57 PST 2016
KP created this revision.
KP added a reviewer: djasper.
KP added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
With AlignConsecutiveDeclarations and PointerAlignment: Right *s and &s were left dangling.
For instance
const char* const* v1;
float const* v2;
SomeVeryLongType const& v3;
was formatted as
const char *const * v1;
float const * v2;
SomeVeryLongType const &v3;
This patch keep the *s or &s aligned to the right, next to their variable.
The above example is now formatted as
const char *const *v1;
float const *v2;
SomeVeryLongType const &v3;
https://reviews.llvm.org/D27651
Files:
lib/Format/WhitespaceManager.cpp
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27651.80996.patch
Type: text/x-patch
Size: 5705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161210/1574b1bb/attachment.bin>
More information about the cfe-commits
mailing list