summaryrefslogtreecommitdiffstats
path: root/clang/docs/ClangFormatStyleOptions.rst
Commit message (Collapse)AuthorAgeFilesLines
* Escaping a special character in the documentation.Aaron Ballman2014-10-091-1/+1
| | | | llvm-svn: 219407
* clang-format: Add option to control call argument bin-packing separatelyDaniel Jasper2014-10-091-3/+9
| | | | | | | This is desirable for the Chromium style guide: http://www.chromium.org/developers/coding-style llvm-svn: 219400
* clang-format: Add documentation about disabling formatting.Daniel Jasper2014-10-071-0/+18
| | | | | | Patch by Marek Kurdej, thanks! llvm-svn: 219204
* [sphinx cleanup]Dan Liew2014-09-161-1/+1
| | | | | | Fix warning introduced by r211098. llvm-svn: 217864
* clang-format: Add option to break before non-assignment operators.Daniel Jasper2014-09-151-3/+13
| | | | | | | | | This will allow: int aaaaaaaaaaaaaa = bbbbbbbbbbbbbb + ccccccccccccccc; llvm-svn: 217757
* [sphinx cleanup]Dan Liew2014-09-101-1/+1
| | | | | | Fix sphinx warning introduced by r217501. llvm-svn: 217524
* clang-format: Add option to allow short case labels on a single line.Daniel Jasper2014-09-101-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | On a single line: switch (a) { case 1: x = 1; return; case 2: x = 2; return; default: break; } Not on a single line: switch (a) { case 1: x = 1; return; case 2: x = 2; return; default: break; } This partly addresses llvm.org/PR16535. In the long run, we probably want to lay these out in columns. llvm-svn: 217501
* clang-format: Add an option 'SpaceAfterCStyleCast'.Daniel Jasper2014-09-031-0/+3
| | | | | | | | | | | | | | | | | This permits to add a space after closing parenthesis of a C-style cast. Defaults to false to preserve old behavior. Fixes llvm.org/PR19982. Before: (int)i; After: (int) i; Patch by Marek Kurdej. llvm-svn: 217022
* clang-format: New option SpacesInSquareBrackets.Daniel Jasper2014-08-261-0/+4
| | | | | | | | | | | | | | | | Before: int a[5]; a[3] += 42; After: int a[ 5 ]; a[ 3 ] += 42; Fixes LLVM bug #17887 (http://llvm.org/bugs/show_bug.cgi?id=17887). Patch by Marek Kurdej, thank you! llvm-svn: 216449
* Add documentation on how Language option in .clang-format files work.Alexander Kornienko2014-08-121-0/+37
| | | | llvm-svn: 215443
* Fix sphinx warning.Dan Liew2014-08-061-1/+1
| | | | llvm-svn: 214967
* clang-format: Add option to always break after a function's return type.Daniel Jasper2014-08-051-2/+9
| | | | | | | | | | This is required for GNU coding style, among others. Also update the configuration documentation. Modified from an original patch by Jarkko Hietaniemi, thank you! llvm-svn: 214858
* Escaping an RST character to correct a Sphinx warning.Aaron Ballman2014-07-221-1/+1
| | | | llvm-svn: 213651
* clang-format: Add new option to indent wrapped function declarations.Daniel Jasper2014-07-091-0/+4
| | | | | | | | | Though not completely identical, make former IndentFunctionDeclarationAfterType change this flag for backwards compatibility (it is somewhat close in meaning and better the err'ing on an unknown config flag). llvm-svn: 212597
* clang-format: Update flag documentation.Daniel Jasper2014-07-091-5/+1
| | | | llvm-svn: 212594
* Escaping a literal character to fix an RST warning.Aaron Ballman2014-06-251-1/+1
| | | | llvm-svn: 211690
* clang-format: Introduce style with spaces on both sides of */&.Daniel Jasper2014-06-171-5/+18
| | | | | | | Patch by Janusz Sobczak (slightly extended). This fixes llvm.org/19929. llvm-svn: 211098
* clang-format: Fix Sphinx build error.Daniel Jasper2014-05-151-2/+3
| | | | | | Patch by Adam Strzelecki, thank you! llvm-svn: 208882
* clang-format: Add option to allow short blocks on a single line.Daniel Jasper2014-05-141-2/+7
| | | | | | | | | With AllowShortBlocksOnASingleLine, clang-format allows: if (a) { return; } Based on patch by Gonzalo BG, thank you! llvm-svn: 208765
* Fix sphinx-build warnings in clang docs.Reid Kleckner2014-04-181-1/+1
| | | | llvm-svn: 206661
* clang-format: Update flag documentation, and generation script.Daniel Jasper2014-04-091-9/+29
| | | | llvm-svn: 205853
* clang-format: Support configurable list of foreach-macros.Daniel Jasper2014-04-011-0/+8
| | | | | | | | This fixes llvm.org/PR17242. Patch by Brian Green, thank you! llvm-svn: 205307
* clang-format: Improve documentation of DerivePointerBinding.Daniel Jasper2014-02-131-3/+23
| | | | | | | | For reference: llvm.org/PR18690. Also updated generated help page and page creation script. llvm-svn: 201323
* Support GNU style rule to put a space before opening parenthesis.Alexander Kornienko2013-12-101-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The rule from the GNU style states: "We find it easier to read a program when it has spaces before the open-parentheses and after the commas." http://www.gnu.org/prep/standards/standards.html#index-spaces-before-open_002dparen This patch makes clang-format adds an option to put spaces before almost all open parentheses, except the cases, where different behavior is dictated by the style rules or language syntax: * preprocessor: ** function-like macro definitions can't have a space between the macro name and the parenthesis; ** `#if defined(...)` can have a space, but it seems, that it's more frequently used without a space in GCC, for example; * never add spaces after unary operators; * adding spaces between two opening parentheses is controlled with the `SpacesInParentheses` option; * never add spaces between `[` and `(` (there's no option yet). Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2326 llvm-svn: 196901
* Updated examples of UseTab optionAlexander Kornienko2013-09-271-2/+2
| | | | llvm-svn: 191529
* Updated clang-format style options doc.Alexander Kornienko2013-09-271-5/+18
| | | | llvm-svn: 191528
* clang-format: Option to removing the space before assignment operators.Daniel Jasper2013-09-251-0/+3
| | | | | | Patch contributed by Aaron Wishnick. Thank you! llvm-svn: 191375
* Allow _clang-format as alternative to .clang-format config filenameHans Wennborg2013-09-101-2/+2
| | | | | | | | | | | Dotfiles are impractical on Windows. This makes clang-format search for the style configuration file as '_clang-format' in addition to the usual '.clang-format'. This is similar to how VIM searches for '_vimrc' on Windows. Differential Revision: http://llvm-reviews.chandlerc.com/D1629 llvm-svn: 190413
* A minor fix in the documentation.Alexander Kornienko2013-09-041-2/+2
| | | | llvm-svn: 189947
* Added documentation for clang-format style options.Alexander Kornienko2013-09-041-0/+375
Summary: The main contents is in the ClangFormatStyleOptions.rst, which can be updated from the Format.h by the dump_format_style.py script. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1597 llvm-svn: 189946
OpenPOWER on IntegriCloud