[all-commits] [llvm/llvm-project] eadb65: [clang-format] [NFC] update the documentation in F...
MyDeveloperDay via All-commits
all-commits at lists.llvm.org
Wed Nov 6 12:03:27 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: eadb65f273c076c4997b28a51f086eea505c3e78
https://github.com/llvm/llvm-project/commit/eadb65f273c076c4997b28a51f086eea505c3e78
Author: paulhoad <mydeveloperday at gmail.com>
Date: 2019-11-06 (Wed, 06 Nov 2019)
Changed paths:
M clang/docs/ClangFormatStyleOptions.rst
M clang/docs/tools/dump_format_style.py
M clang/include/clang/Format/Format.h
Log Message:
-----------
[clang-format] [NFC] update the documentation in Format.h to allow 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
More information about the All-commits
mailing list