clang-format: wrong spacing for pointer-type multiple variable declaration |
||
Issue descriptionAccording to our code style [1]: const uint8_t* cur, *next; but clang-format does: const uint8_t *cur, *next; (note the spacing of * between uint8_t and cur). Unsurprisingly most of the codebase today violates the code style and uses the clang-format way: 73 results for: type *x, *y [2] 3 results for: type* x, *y [3] [1] https://google.github.io/styleguide/cppguide.html#Pointer_and_Reference_Expressions """ // These are fine, space following. char* c; // but remember to do "char* c, *d, *e, ...;"! """ [2] https://cs.chromium.org/search/?q=%5Cw%2B%5C+%5C*%5Cw%2B,%5C+%5C*%5Cw%2B+-f:third_party&sq=package:chromium&type=cs [3] https://cs.chromium.org/search/?q=%5Cw%2B%5C*%5C+%5Cw%2B,%5C+%5C*%5Cw%2B+-f:third_party&sq=package:chromium&type=cs
,
Sep 21 2016
(current status: started a thread with the style folks; sound like they're going to recommend just a single decl per line if you declare a pointer or ref)
,
Oct 26 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by thakis@chromium.org
, Sep 13 2016