Re: [PATCH] Add clang-format config to contrib folder

2015-11-20 Thread Jeff Law
On 11/20/2015 04:33 AM, Martin Liška wrote: On 11/19/2015 06:43 PM, Pedro Alves wrote: On 11/19/2015 12:54 PM, Martin Liška wrote: ContinuationIndentWidth: 2 -ForEachMacros: ['_FOR_EACH','_FOR_EACH_1','FOR_EACH_AGGR_INIT_EXPR_ARG','FOR_EACH_ALIAS','FOR_EACH_ALLOCNO','FOR_EACH_ALLOCNO_OBJECT'

Re: [PATCH] Add clang-format config to contrib folder

2015-11-20 Thread Pedro Alves
On 11/20/2015 11:33 AM, Martin Liška wrote: > Hi Pedro. Hi Martin. > Fully agree with you, there's suggested patch. > Hope I can install the patch for trunk? I'd call it obvious. :-) Thanks, Pedro Alves

Re: [PATCH] Add clang-format config to contrib folder

2015-11-20 Thread Martin Liška
On 11/19/2015 06:43 PM, Pedro Alves wrote: > On 11/19/2015 12:54 PM, Martin Liška wrote: >> ContinuationIndentWidth: 2 >> -ForEachMacros: >> ['_FOR_EACH','_FOR_EACH_1','FOR_EACH_AGGR_INIT_EXPR_ARG','FOR_EACH_ALIAS','FOR_EACH_ALLOCNO','FOR_EACH_ALLOCNO_OBJECT','FOR_EACH_ARTIFICIAL_DEF','FOR_EACH_A

Re: [PATCH] Add clang-format config to contrib folder

2015-11-19 Thread Pedro Alves
On 11/19/2015 12:54 PM, Martin Liška wrote: > ContinuationIndentWidth: 2 > -ForEachMacros: > ['_FOR_EACH','_FOR_EACH_1','FOR_EACH_AGGR_INIT_EXPR_ARG','FOR_EACH_ALIAS','FOR_EACH_ALLOCNO','FOR_EACH_ALLOCNO_OBJECT','FOR_EACH_ARTIFICIAL_DEF','FOR_EACH_ARTIFICIAL_USE','FOR_EACH_BB_FN','FOR_EACH_BB_REV

Re: [PATCH] Add clang-format config to contrib folder

2015-11-19 Thread Hans-Peter Nilsson
On Wed, 18 Nov 2015, Jeff Law wrote: > Given that gnu-indent seems to muck up C++ badly in my > experience, clang-format may be a better long term solution. I'd really like > to get to a point one day where formatting is a commit hook so that things are > always kept properly formatted. I hope yo

Re: [PATCH] Add clang-format config to contrib folder

2015-11-19 Thread Martin Liška
On 11/19/2015 11:40 AM, Martin Liška wrote: > On 11/19/2015 12:09 AM, Sebastian Pop wrote: >> Martin, thanks for getting this patch out. I like the patch. >> Jeff, clang-format has scripts that allow formatting only the lines >> touched by a patch. >> It also has a script to integrate with git: >>

Re: [PATCH] Add clang-format config to contrib folder

2015-11-19 Thread Martin Liška
:58 +0100 Subject: [PATCH] Add clang-format config to contrib folder ChangeLog: 2015-11-18 Martin Liska * Makefile.in: Add clang-format. * Makefile.tpl: Likewise. contrib/ChangeLog: 2015-11-18 Martin Liska * clang-format: New file. --- Makefile.in | 9 + Makefile.tpl

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Sebastian Pop
Martin, thanks for getting this patch out. I like the patch. Jeff, clang-format has scripts that allow formatting only the lines touched by a patch. It also has a script to integrate with git: https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format We could use those script

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Jeff Law
On 11/18/2015 10:34 AM, Manuel López-Ibáñez wrote: Which is a sad demonstration of how the refusal of GCC's FEs being re-used for other purposes by GNU tools (and others) was and is a mistake, and it is leading to GNU tools being replaced by LLVM-based ones (ultimately affecting GCC and GDB them

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Manuel López-Ibáñez
On 18/11/15 17:05, Jeff Law wrote: As we've been continuously converting our source base to C++, the clang-format should provide better results than a collection of regular expressions (check_GNU_style.sh). As a reference file I attach gcc/tree-ssa-uninit.c file. Feel free to comment the suggest

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Jeff Law
On 11/18/2015 07:10 AM, Martin Liška wrote: Hello. Following patch adds a clang-format config file that should respect the GNU coding standards. As the file is not part of build process, I hope the patch can be applied even though we've just skipped to stage3? The patch adds a hunk to Makefile

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Markus Trippelsdorf
On 2015.11.18 at 15:37 +0100, Markus Trippelsdorf wrote: > On 2015.11.18 at 15:10 +0100, Martin Liška wrote: > > Hello. > > > > Following patch adds a clang-format config file that should respect the GNU > > coding standards. > > As the file is not part of build process, I hope the patch can be a

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Markus Trippelsdorf
On 2015.11.18 at 15:10 +0100, Martin Liška wrote: > Hello. > > Following patch adds a clang-format config file that should respect the GNU > coding standards. > As the file is not part of build process, I hope the patch can be applied > even though > we've just skipped to stage3? The patch adds

[PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Martin Liška
ile I attach gcc/tree-ssa-uninit.c file. Feel free to comment the suggested configuration file. Thanks, Martin From 5f5eab4f9bbe76ec4d91f80dd3fb6909abd39695 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 18 Nov 2015 14:40:58 +0100 Subject: [PATCH] Add clang-format config to contrib folder Chang