summaryrefslogtreecommitdiffstats
path: root/clang/docs/ClangFormat.rst
Commit message (Collapse)AuthorAgeFilesLines
* Allow additional file suffixes/extensions considered as source in main ↵mydeveloperday2019-11-121-3/+3
| | | | | | | | | | | | | | | | | | | | | include grouping Summary: By additional regex match, grouping of main include can be enabled in files that are not normally considered as a C/C++ source code. For example, this might be useful in templated code, where template implementations are being held in *Impl.hpp files. On the occassion, 'assume-filename' option description was reworded as it was misleading. It has nothing to do with `style=file` option and it does not influence sourced style filename. Reviewers: rsmith, ioeric, krasimir, sylvestre.ledru, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, cfe-commits Patch by: furdyna Tags: #clang Differential Revision: https://reviews.llvm.org/D67750
* clang-format: fix a typo introduced by the previous changeSylvestre Ledru2019-11-111-1/+1
|
* clang-format: refresh the list of optionsSylvestre Ledru2019-11-081-45/+52
|
* Adding 'CLion integration' to clang-format docSylvestre Ledru2019-04-031-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: This commit adds a chapter 'CLion integration' to ClangFormat.rst. The official announcement of clang-format support in CLion 2019.1: https://blog.jetbrains.com/clion/2019/03/clion-2019-1-embedded-dev-clangformat-memory-view/ Patch by Marina Kalashina Reviewers: djasper, sylvestre.ledru, krasimir Reviewed By: sylvestre.ledru Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60115 llvm-svn: 357566
* [clang-format] Add basic support for formatting C# filesPaul Hoad2019-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This revision adds basic support for formatting C# files with clang-format, I know the barrier to entry is high here so I'm sending this revision in to test the water as to whether this might be something we'd consider landing. Tracking in Bugzilla as: https://bugs.llvm.org/show_bug.cgi?id=40850 Justification: C# code just looks ugly in comparison to the C++ code in our source tree which is clang-formatted. I've struggled with Visual Studio reformatting to get a clean and consistent style, I want to format our C# code on saving like I do now for C++ and i want it to have the same style as defined in our .clang-format file, so it consistent as it can be with C++. (Braces/Breaking/Spaces/Indent etc..) Using clang format without this patch leaves the code in a bad state, sometimes when the BreakStringLiterals is set, it fails to compile. Mostly the C# is similar to Java, except instead of JavaAnnotations I try to reuse the TT_AttributeSquare. Almost the most valuable portion is to have a new Language in order to partition the configuration for C# within a common .clang-format file, with the auto detection on the .cs extension. But there are other C# specific styles that could be added later if this is accepted. in particular how `{ set;get }` is formatted. Reviewers: djasper, klimek, krasimir, benhamilton, JonasToth Reviewed By: klimek Subscribers: llvm-commits, mgorny, jdoerfert, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D58404 llvm-svn: 356662
* clang-format-diff: add an example with hgSylvestre Ledru2019-01-011-0/+6
| | | | llvm-svn: 350191
* Update our URLs in clang doc to use httpsSylvestre Ledru2018-11-041-1/+1
| | | | llvm-svn: 346101
* [Docs] Update list of languages clang-format can formatMalcolm Parsons2017-11-221-1/+1
| | | | llvm-svn: 318827
* clang-format: add an option -verbose to list the files being processedSylvestre Ledru2017-08-121-0/+1
| | | | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D34824 llvm-svn: 310778
* clang-format: Add capability to format the diff on save in vim.Daniel Jasper2017-06-191-0/+12
| | | | | | | | | | | With this patch, one can configure a BufWrite hook that will make the clang-format integration compute a diff of the current buffer with the file that's on disk and format all changed lines. This should create a zero-overhead auto-format solution that doesn't require the file to already be clang-format clean to avoid spurious diffs. Review: https://reviews.llvm.org/D32429 llvm-svn: 305665
* [Docs] Correct the path to the clang-format-diff.py script to include the ↵Craig Topper2017-04-241-2/+3
| | | | | | clang-format directory. llvm-svn: 301202
* Add the --no-color option to the git call in the doc when using ↵Sylvestre Ledru2016-12-031-1/+1
| | | | | | clang-format-diff llvm-svn: 288605
* This is a malformed :option: tag -- we don't have an option directive that ↵Aaron Ballman2016-07-141-1/+1
| | | | | | matches it, so turning it actual text instead of a markup tag. This will hopefully fix the clang docs build (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15194/steps/docs-clang-html/logs/stdio) llvm-svn: 275407
* fix missing whitespace in sphinx docEtienne Bergeron2016-07-131-1/+1
| | | | llvm-svn: 275256
* Update `clang-format -help` output in clang-format docs.Nico Weber2015-10-191-39/+48
| | | | | | | | | | -assume-filename, -fallback-style, and -sort-includes are new. (They're also longer than the previous options, so all descriptions shift over by some amount, making this diff look larger than it is.) It looks like someone renamed "General options" to "Generic Options" too. llvm-svn: 250672
* docs: remove double carriage-returnSaleem Abdulrasool2014-11-021-2/+2
| | | | | | | The double carriage return would silence a warning due to a missing .clang-format. Permit the error to bubble through. llvm-svn: 221107
* clang-format: improve vim integration docsSaleem Abdulrasool2014-10-271-2/+2
| | | | | | | | | | Improve the documentation for vim integration of clang-format. Prefer the use of <c-o> to do the normal mode command execution to avoid side-effects of the escape and re-insertion (cursor movement). Tweak the macros to use a double return to avoid having to manually return control to the editor from the subprocess. llvm-svn: 220685
* clang-format: Add clang-format-diff usage examples for SVN.Daniel Jasper2014-05-141-0/+6
| | | | llvm-svn: 208766
* clang-format-diff.py: Support -regex filter and more filename extensionsAlp Toker2013-12-101-6/+7
| | | | | | | | | | | | | Add support for more filename extensions based on the list in the clang plus JavaScript. Also adds a -regex option so users can override defaults if they have unusual file extensions or want to format everything in the diff. Keeping with tradition the flag is modelled on Unix conventions, this time matching the semantics of find(1). llvm-svn: 196917
* clang-format-diff.py: Fix 'beintroduced' in help outputAlp Toker2013-12-041-4/+6
| | | | | | Also update docs to reflect recently changed -i inplace edit behaviour. llvm-svn: 196336
* Add section on VS integration to the ClangFormat documentation.Manuel Klimek2013-09-291-0/+7
| | | | llvm-svn: 191642
* 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
* Added documentation for clang-format style options.Alexander Kornienko2013-09-041-0/+14
| | | | | | | | | | | | | | | | 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
* Added WebKit style to the BasedOnStyle handling and to the relevant help ↵Alexander Kornienko2013-09-021-3/+4
| | | | | | messages. llvm-svn: 189765
* Whitespace changes in help messages + updated help output in .rst file.Alexander Kornienko2013-09-021-3/+11
| | | | llvm-svn: 189762
* [docs] Fix wrong clang-format example.Rui Ueyama2013-06-141-1/+1
| | | | llvm-svn: 183963
* Clang-format: allow -style="{yaml/json}" on command lineAlexander Kornienko2013-05-191-3/+6
| | | | | | | | | | | | | | Summary: + improved handling of default style and predefined styles. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D813 llvm-svn: 182205
* Reformat clang-format help strings, filter out irrelevant options.Alexander Kornienko2013-05-101-12/+34
| | | | | | | | | | | | | | Summary: +updated ClangFormat.rst Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D780 llvm-svn: 181617
* Basic clang-format integration for BBEdit.Daniel Jasper2013-05-021-0/+15
| | | | | | Thanks to Avi Drissman! llvm-svn: 180933
* Small improvements to clang-format documentation and integrationDaniel Jasper2013-04-171-2/+17
| | | | | | scripts. llvm-svn: 179676
* Update docs after moving clang-format from clang-tools-extra to cfe.Daniel Jasper2013-03-221-10/+9
| | | | llvm-svn: 177729
* [docs] Use vim code-block instead of console.Sean Silva2013-03-031-1/+1
| | | | llvm-svn: 176418
* ClangFormat.rst: Fix two small typosHans Wennborg2013-02-281-2/+2
| | | | llvm-svn: 176276
* ClangFormat.rst: improve formattingDmitri Gribenko2013-01-091-12/+12
| | | | llvm-svn: 172007
* Add documentation for clang-format.Daniel Jasper2013-01-091-0/+94
This adds documentation for both LibFormat as well as the standalone tools and integrations built on top of it. It slightly restructures the ClangTools documentation. llvm-svn: 172004
OpenPOWER on IntegriCloud