diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-07-25 10:21:47 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-07-25 10:21:47 +0000 |
commit | cf699ad9ab458ed94de8a4e772534ff4a23c8933 (patch) | |
tree | 9317c56dd20a26b9661993b59bfb640a84d03bc8 /clang/docs/tools | |
parent | 95baa840c2f104dc15d9930284587edf64d224b1 (diff) | |
download | bcm5719-llvm-cf699ad9ab458ed94de8a4e772534ff4a23c8933.tar.gz bcm5719-llvm-cf699ad9ab458ed94de8a4e772534ff4a23c8933.zip |
[clang-format ]Extend IncludeCategories regex documentation
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
Diffstat (limited to 'clang/docs/tools')
-rwxr-xr-x | clang/docs/tools/dump_format_style.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py index 1ca050e062b..3d61227f736 100755 --- a/clang/docs/tools/dump_format_style.py +++ b/clang/docs/tools/dump_format_style.py @@ -10,6 +10,7 @@ import urllib2 CLANG_DIR = os.path.join(os.path.dirname(__file__), '../..') FORMAT_STYLE_FILE = os.path.join(CLANG_DIR, 'include/clang/Format/Format.h') +INCLUDE_STYLE_FILE = os.path.join(CLANG_DIR, 'include/clang/Tooling/Inclusions/IncludeStyle.h') DOC_FILE = os.path.join(CLANG_DIR, 'docs/ClangFormatStyleOptions.rst') @@ -115,7 +116,7 @@ def read_options(header): for line in header: line = line.strip() if state == State.BeforeStruct: - if line == 'struct FormatStyle {': + if line == 'struct FormatStyle {' or line == 'struct IncludeStyle {': state = State.InStruct elif state == State.InStruct: if line.startswith('///'): @@ -188,6 +189,7 @@ def read_options(header): return options options = read_options(open(FORMAT_STYLE_FILE)) +options += read_options(open(INCLUDE_STYLE_FILE)) options = sorted(options, key=lambda x: x.name) options_text = '\n\n'.join(map(str, options)) |