[PATCH] D30532: Add examples to clang-format configuration

2017-03-06 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Thank you for doing this! https://reviews.llvm.org/D30532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30532: Add examples to clang-format configuration

2017-03-06 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru marked 2 inline comments as done. sylvestre.ledru added a comment. Daniel, it is good for me now. Once it is accepted, I will work on the rest in a separate commit if that is ok with you; https://reviews.llvm.org/D30532 ___

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 90486. sylvestre.ledru added a comment. updated => affected + align the vs https://reviews.llvm.org/D30532 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 90482. sylvestre.ledru added a comment. With the changes requested by Daniel. This is much better indeed! https://reviews.llvm.org/D30532 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index:

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I also think that examples for the flags are good. My use case is that while developing/debugging its nice to see a short example for a random flag in the documentation pop-up. https://reviews.llvm.org/D30532 ___

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I agree, just generally we should aim for keeping these short. The example you gave might actually be reasonable to compare in two columns, i.e.: true: false: SomeClass::Constructor() vs. SomeClass::Constructor() : a(a),

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. > For bool options it seems easiest to do something like: > true: x = ( int32 )y; > false: x = (int32)y; That works for single declarations but for stuff like: > SomeClass::Constructor() > : a(a) > , b(b) > , c(c) {} I won't

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. For what it's worth, I also find this useful to be able to see at a glance what the setting does. I know I've tried several different settings in the past before finding the one I was looking for. https://reviews.llvm.org/D30532

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Sure, then go ahead. If these examples would have helped you, that's one datapoint :). As for presenting the difference in options, that would be useful I think. So if you are up to also doing that, that'd be appreciated. For bool options it seems easiest to do

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. I see a lot of values in examples. If I started this review, it is because I was lost in all the options and could not find what I was looking for. If you want, I can update the example to provide results with and without the option. like > With

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Hm. I don't actually know whether these examples are useful as is. You only present one setting of the value in most cases. What's interesting is actually how the flag changes the behavior. I mean in most cases, this can be derived from the example, but in those cases,

[PATCH] D30532: Add examples to clang-format configuration

2017-03-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 90331. sylvestre.ledru added a comment. With the rst generation https://reviews.llvm.org/D30532 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: docs/ClangFormatStyleOptions.rst

[PATCH] D30532: Add examples to clang-format configuration

2017-03-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added inline comments. Comment at: docs/ClangFormatStyleOptions.rst:218 + +#define A \ +int ; \ klimek wrote: > Do we really align these 3 spaces out? nope, bad copy and paste it seems. Sorry Comment at:

[PATCH] D30532: Add examples to clang-format configuration

2017-03-02 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: docs/ClangFormatStyleOptions.rst:218 + +#define A \ +int ; \ Do we really align these 3 spaces out? Comment at: docs/ClangFormatStyleOptions.rst:447 + SomeClass::Constructor() +

[PATCH] D30532: Add examples to clang-format configuration

2017-03-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. If you think it makes sense, I will do that for the rest of the options https://reviews.llvm.org/D30532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30532: Add examples to clang-format configuration

2017-03-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. https://reviews.llvm.org/D30532 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: docs/ClangFormatStyleOptions.rst === --- docs/ClangFormatStyleOptions.rst +++