[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)

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 09:29:39 PDT 2019


MyDeveloperDay marked 2 inline comments as done.
MyDeveloperDay added inline comments.


================
Comment at: clang/docs/tools/dump_format_style.py:175
+        val = line.replace(',', '')
+        pos = val.find(" // ")
+        if (pos != -1):
----------------
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)


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