summaryrefslogtreecommitdiffstats
path: root/clang/docs/tools/dump_format_style.py
Commit message (Collapse)AuthorAgeFilesLines
* [clang-format] Ensure dump_format_style.py can generate ↵paul_hoad2019-11-081-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | ClangFormatStyleOptions.rst without manual intervention Summary: This revision is the last in a series of revisions to return `clang/doc/tools/dump_format_style.py` to be being able to parse Format.h without needing to manually merge the ClangFormatStyleOptions.rst file. The final modification to dump_format_style.py is needed following the addition of a nested enumeration inside a nested structure following the introduction of {D68296} Prior related revisions will allow for a fully clang-formatted `clang/include/clang/Format/Format.h` to once again be used at the source. {D69951} {D69433} {D69404} Reviewers: mitchell-stellar, klimek, sammccall, owenpan Reviewed By: mitchell-stellar Subscribers: cfe-commits Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D70003
* [clang-format] [NFC] update the documentation in Format.h to allow ↵paulhoad2019-11-061-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dump_format_style.py to get a little closer to being correct. (part 2) Summary: a change {D67541} cause LanguageStandard to now be subtly different from all other clang-format options, in that the Enum value (less the prefix) is not always allowed as valid as the configuration option. This caused the ClangFormatStyleOptions.rst and the Format.h to diverge so that the ClangFormatStyleOptions.rst could no longer be generated from the Format.h using dump_format_stlye.py This fix tried to remedy that: 1) by allowing an additional comment (in Format.h) after the enum to be used as the `in configuration ( XXXX )` text, and changing the dump_format_style.py to support that. This makes the following code: ``` enum { ... LS_Cpp03, // c++03 LS_Cpp11, // c++11 ... }; ``` would render as: ```* ``LS_Cpp03`` (in configuration: ``c++03``) * ``LS_Cpp11`` (in configuration: ``c++11``) ``` And we also move the deprecated alias into the text of the enum (otherwise it won't be added at the end as an option) This patch includes a couple of other whitespace changes which help bring Format.h and ClangFormatStyleOptions.rst almost back into line and regeneratable... (there is still one more) Reviewers: klimek, mitchell-stellar, sammccall Reviewed By: mitchell-stellar, sammccall Subscribers: mrexodia, cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D69433
* Portable Python script across Python versionSerge Guelton2018-12-191-1/+0
| | | | | | | | | urllib2 as been renamed into urllib and the library layout has changed. Workaround that in a consistent manner. Differential Revision: https://reviews.llvm.org/D55199 llvm-svn: 349627
* Portable Python script across Python versionSerge Guelton2018-12-181-2/+2
| | | | | | | dict no longer have the `has_key` method in Python3. Instead, one can use the `in` keyword which already works in Python2. llvm-svn: 349447
* Portable Python script across versionSerge Guelton2018-12-031-6/+6
| | | | | | | | | Have all classes derive from object: that's implicitly the default in Python3, it needs to be done explicilty in Python2. Differential Revision: https://reviews.llvm.org/D55121 llvm-svn: 348127
* [clang-format ]Extend IncludeCategories regex documentationKrasimir Georgiev2018-07-251-1/+3
| | | | | | | | | | | | | | | | | | | Summary: Extend the Clang-Format IncludeCategories documentation by adding a link to the supported regular expression standard (POSIX). And extenting the example with a system header regex. [[ https://bugs.llvm.org/show_bug.cgi?id=35041 | bug 35041]] Contributed by WimLeflere! Reviewers: krasimir, Typz Reviewed By: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48827 llvm-svn: 337899
* [clang-format] Sort using declarations by splitting on '::'Krasimir Georgiev2017-11-091-1/+2
| | | | | | | | | | | | | | Summary: This patch improves using declarations sorting. Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39786 llvm-svn: 317794
* [clang-format] Update dump_format_style.py to indent nested fieldsKrasimir Georgiev2017-06-231-5/+6
| | | | | | | | | | | | | | | | | | Summary: This updates the format options documentation script to indent the documentation of nested fields. The previous format caused some problems, as when a bulleted list ends with a multiline comment. See the buildbot failure http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/10020/steps/docs-clang-html/logs/stdio Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34552 llvm-svn: 306093
* [clang-format] Add more examples and fix a bug in the py generation scriptSylvestre Ledru2017-03-131-1/+1
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30860 llvm-svn: 297623
* Remove a useless subsitution in doxygen2rst which was incorrectly replacing ↵Sylvestre Ledru2017-03-091-1/+0
| | | | | | | | | | | | | | | | * by \* Summary: For example, "int\* a;" is displayed instead of "int* a;" Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30740 llvm-svn: 297363
* Support language selection for \code blocks.Alexander Kornienko2016-02-231-3/+7
| | | | llvm-svn: 261644
* Allow running dump_format_style.py from any directory.Alexander Kornienko2016-02-231-2/+4
| | | | llvm-svn: 261642
* Fix ASTMatcher reference newlines and make the generator script windows-proof.Benjamin Kramer2015-11-201-1/+1
| | | | llvm-svn: 253653
* clang-format: Hopefully fix code blocks in docs.Daniel Jasper2015-10-071-1/+1
| | | | | | Otherwise I will have to install sphinx ;).. llvm-svn: 249542
* clang-format: Add empty line before code-blocks in Docs.Daniel Jasper2015-10-061-1/+1
| | | | llvm-svn: 249394
* clang-format: Make IncludeCategories configurable in .clang-format file.Daniel Jasper2015-10-061-4/+6
| | | | | | | | | This was made much easier by introducing an IncludeCategory struct to replace the previously used std::pair. Also, cleaned up documentation and added examples. llvm-svn: 249392
* clang-format: Add a new brace style "custom" as well as flags toDaniel Jasper2015-09-291-4/+50
| | | | | | | | | | | | | | | control the individual braces. The existing choices for brace wrapping are now merely presets for the different flags that get expanded upon calling the reformat function. All presets have been chose to keep the existing formatting, so there shouldn't be any difference in formatting behavior. Also change the dump_format_style.py to properly document the nested structs that are used to keep these flags discoverable among all the configuration flags. llvm-svn: 248802
* clang-format: Escape '*' in generated flag documentation.Daniel Jasper2014-12-021-0/+1
| | | | llvm-svn: 223118
* clang-format: Update flag documentation, and generation script.Daniel Jasper2014-04-091-2/+3
| | | | llvm-svn: 205853
* clang-format: Improve documentation of DerivePointerBinding.Daniel Jasper2014-02-131-2/+2
| | | | | | | | For reference: llvm.org/PR18690. Also updated generated help page and page creation script. llvm-svn: 201323
* Added documentation for clang-format style options.Alexander Kornienko2013-09-041-0/+143
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