If there was this enum definition before:
struct FormatStyle { //... /// Some documentation enum WhateverStyle : unsigned char { /// Foo WS_Bar = 5 }; };
We would output the following in
clang/docs/ClangFormatStyleOptions.rst
when running cd ~/llvm-project/clang/docs/tools && ./dump_format_style.py:
* ``WS_Bar = 5`` (in configuration: ``Bar = 5``) Foo.
With this patch, we change it to something that looks more like what we
are accustomed to:
* ``WS_Bar`` (in configuration: ``Bar``) Foo.
This is a theoretical change because we don't have format style enums
that currently explicitly select a value. But while I was doing some
research on how to extend the FormatStyle I noticed this behavior and
thought it would make a small change.
You can experiment with and without this change by simply running
dump_format_style.py while setting AIAS_Left to AIAS_Left = 0
in clang/include/clang/Format/Format.h. Without this change in
Format.h you shouldn't see any change being made to
clang/docs/ClangFormatStyleOptions.rst.
Feels like there is repetition here