[PATCH] D69433: [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)
Mitchell via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 14:01:50 PDT 2019
mitchell-stellar added inline comments.
================
Comment at: clang/docs/tools/dump_format_style.py:175
+ val = line.replace(',', '')
+ pos = val.find(" // ")
+ if (pos != -1):
----------------
MyDeveloperDay wrote:
> mitchell-stellar wrote:
> > This seems quite flimsy to me, as it depends on an undocumented comment style. It is true that if the file(s) in question are properly clang-formatted, then this would probably not fail, but it does not appear to be a very robust solution.
> I'd tend to agree, but this whole dump_format_style.py is flimsy.. take a look at this review {D31574}
>
> When you added this line, you forgot the third /
>
> ```// Different ways to wrap braces after control statements.```
>
> Also, the extra empty line in the LanguageStandard both caused the whole python file to fail with an exception.
>
> Do you have a suggestion for something better? (which doesn't leave the Format.h looking too odd)
I would go back to the `/// c++03: Parse and format as C++03.` style. `///` is a Doxygen comment, and I think documentation should be generated solely from Doxygen comments, even if it requires a bit of post-processing. (The extra `/` needed after `//` in the ticket you mentioned is justified.)
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69433/new/
https://reviews.llvm.org/D69433
More information about the cfe-commits
mailing list