Ran clang-format on all .c/.cpp/.h files in clang-tools-extra.
Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I assume you've just run clang-format on the sources? If yes, please say so in the patch description. If no, why fix any whitespace manually?
I assume you've just run clang-format on the sources? If yes, please say so in the patch description. If no, why fix any whitespace manually?
Please revert all files in test/. In many cases whitespace is important there and I don't want anyone to spend time figuring out all these cases.
- Please revert clang-reorder-fields, include-fixer, modularize and pptrace. The patch is too large now to work conveniently with it.
- Try using a fresher version of clang-format to fix the formatting of switch case labels (see inline comments for details).
- Once you address the comments, mark them as "Done" and check that clang-tools-extra still compiles and the tests pass.
clang-tidy/cert/CERTTidyModule.cpp | ||
---|---|---|
48–69 ↗ | (On Diff #77050) | <ignore this comment. phabricator doesn't let me delete it for some reason> |
clang-tidy/cppcoreguidelines/SlicingCheck.h | ||
21–25 ↗ | (On Diff #77050) | Please revert this. |
clang-tidy/google/GlobalNamesInHeadersCheck.cpp | ||
1–2 ↗ | (On Diff #77050) | Please fix. |
clang-tidy/google/MemsetZeroLengthCheck.cpp | ||
1–2 ↗ | (On Diff #77050) | Please fix. |
clang-tidy/google/MemsetZeroLengthCheck.h | ||
1–2 ↗ | (On Diff #77050) | Please fix. |
clang-tidy/google/NonConstReferences.cpp | ||
88–124 ↗ | (On Diff #77050) | Case labels should be indented by 2. Looks like a bug in clang-format, which doesn't, however, manifest in the version I'm using. Please revert this block. |
clang-tidy/google/StringReferenceMemberCheck.h | ||
1–2 ↗ | (On Diff #77050) | Please fix. |
clang-tidy/misc/ArgumentCommentCheck.h | ||
30–31 ↗ | (On Diff #77050) | Please revert this line. |
clang-tidy/misc/NoexceptMoveConstructorCheck.cpp | ||
46–66 ↗ | (On Diff #77050) | Case labels should be indented. Please revert this block or reformat using a fresher version of clang-format. |
clang-tools-extra compiles fine and tests pass:
Testing Time: 8.27s
Expected Passes : 291 Expected Failures : 1
One nit, otherwise LG. Do you need me to commit this for you?
clang-tidy/google/MemsetZeroLengthCheck.cpp | ||
---|---|---|
1 ↗ | (On Diff #77128) | The right way to fix this is to remove extra -s so that clang-format won't wrap the line next time. |
I had to rebase the patch as one of the files (clang-tidy/misc/NonCopyableObjects.cpp) had changed since I pushed my patch.