Re: [PATCH] [clang-format] AllowSimpleBracedStatements

2014-05-14 Thread Gonzalo BG
It looks like you might have attached the wrong diff. It contains nothing but formatting changes as far as I can tell. Indeed. Sorry about that. Here is the whole patch. It is however unformatted. Bests, Gonzalo P.S: I tried to find how to format the diff with clang-format. The only way I

Re: [PATCH] [clang-format] AllowSimpleBracedStatements

2014-05-14 Thread Daniel Jasper
On Wed, May 14, 2014 at 9:38 AM, Gonzalo BG gonzalob...@gmail.com wrote: It looks like you might have attached the wrong diff. It contains nothing but formatting changes as far as I can tell. Indeed. Sorry about that. Here is the whole patch. It is however unformatted. Bests, Gonzalo

Re: [PATCH] [clang-format] AllowSimpleBracedStatements

2014-05-14 Thread Gonzalo BG
Thanks! I just tried it and the following works fine: svn diff --diff-cmd=diff -x-U0 | tools/clang-format/clang-format-diff.py Maybe one could add a single line to the llvm docs (here: http://clang.llvm.org/docs/ClangFormat.html) explaining how to use it with svn since there is only an

Re: [PATCH] [clang-format] AllowSimpleBracedStatements

2014-05-14 Thread Daniel Jasper
Submitted patch and added SVN usage instructions in r208765 and r208766, respectively. On Wed, May 14, 2014 at 11:27 AM, Gonzalo BG gonzalob...@gmail.com wrote: Thanks! I just tried it and the following works fine: svn diff --diff-cmd=diff -x-U0 | tools/clang-format/clang-format-diff.py

Re: [PATCH] [clang-format] AllowSimpleBracedStatements

2014-05-13 Thread Daniel Jasper
It looks like you might have attached the wrong diff. It contains nothing but formatting changes as far as I can tell. Cheers, Daniel On Mon, May 12, 2014 at 8:19 PM, Gonzalo BG gonzalob...@gmail.com wrote: This patch adds a new option AllowSimpleBracedStatements that allows braced

[PATCH] [clang-format] AllowSimpleBracedStatements

2014-05-12 Thread Gonzalo BG
This patch adds a new option AllowSimpleBracedStatements that allows braced statements to be considered as simple. That is, if AllowShortIfStatementsOnASingleLine and AllowShortLoopStatementsOnASingle line are enabled, code like: if (true) { f(); } can be wrapped into a single line as: if