Add an invocation of clang tidy that applies to the tests for LLVM-libc.
The next patch will include the actual changes made by applying the new
formatting rules.
Details
- Reviewers
sivachandra lntue
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/test/src/string/memory_utils/.clang-tidy | ||
---|---|---|
1 | I would actually vote for not adding any of these .clang-tidy files in this round. Just the CMake change to run clang-tidy for the tests should be sufficient as it will then use the main .clang-tidy file which is good enough to start with. WDYT? |
libc/test/src/string/memory_utils/.clang-tidy | ||
---|---|---|
1 | The problem is that each of these .clang-tidy files have reasons behind them. The other two are there because those files are matching external interfaces that we can't change, and so reformatting them is unhelpful. This file is because clang-tidy will fully crash if it tries to format utils_test.cpp, for which I filed a bug here: https://github.com/llvm/llvm-project/issues/52825. I can remove the other two files, although it will cause a lot of log spam from the formatter being confused about functions with names that don't match our formatting, but are defined by gtest or MPFR (e.g. addTest). On the other hand, there's already a lot of log spam from the files that also implement the gtest interface, but are not in that folder (e.g. TmMatcher). |
libc/test/src/string/memory_utils/.clang-tidy | ||
---|---|---|
1 | Lets do it this way then. Can you land it https://reviews.llvm.org/D116127 as a separate cleanup patch? We will play with this change after that to better understand how to proceed. |
libc/test/src/string/memory_utils/.clang-tidy | ||
---|---|---|
1 | SGTM |
I would actually vote for not adding any of these .clang-tidy files in this round. Just the CMake change to run clang-tidy for the tests should be sufficient as it will then use the main .clang-tidy file which is good enough to start with. WDYT?