Patch for clang-format to allow references and pointers to bind differently

Dmitri Gribenko gribozavr at gmail.com
Fri Nov 29 13:45:35 PST 2013


On Fri, Nov 29, 2013 at 12:40 PM, Ben Longbons <brlongbons at gmail.com> wrote:
> On Thu, Nov 28, 2013 at 1:21 AM, Daniel Jasper <djasper at google.com> wrote:
>> Well, it is also quite rare that people declare multiple uninitialized
>> pointers in one line (and it would be a questionable practice).
> It is extremely common. I checked both LLVM (1 thousand such
> declarations, sloccount 2 million) and Linux (10 thousand / 10
> million) using the following regex, which gives a few false positives
> but not many:
> [^/]\*.*, \*

I would say that about a half of hits in Clang are false positives of this kind:

  foo(*bar, *baz);

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list