Follow up to #27311 (comment), as IWYU now has a clang_16 branch.
This also removes some workarounds for (now fixed) clang-tidy issues, and simplifies the IWYU install steps.
Follow up to #27311 (comment), as IWYU now has a clang_16 branch.
This also removes some workarounds for (now fixed) clang-tidy issues, and simplifies the IWYU install steps.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | hebasto, MarcoFalke, josibake |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Note that even though the CI here is “green”, the tidy task has failed:
0In file included from common/url.cpp:5:
1In file included from ./common/url.h:8:
2In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/string:40:
3In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/char_traits.h:39:
4In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/postypes.h:40:
5In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/cwchar:44:
6/usr/include/wchar.h:35:10: fatal error: 'stddef.h' file not found
7#include <stddef.h>
8 ^~~~~~~~~~
0/usr/include/wchar.h:35:10: fatal error: 'stddef.h' file not found 1#include <stddef.h> 2 ^~~~~~~~~~
This error can be fixed with the following diff:
0--- a/ci/test/00_setup_env_native_tidy.sh
1+++ b/ci/test/00_setup_env_native_tidy.sh
2@@ -15,5 +15,5 @@ export RUN_FUNCTIONAL_TESTS=false
3 export RUN_FUZZ_TESTS=false
4 export RUN_TIDY=true
5 export GOAL="install"
6-export BITCOIN_CONFIG="CC=clang-16 CXX=clang++-16 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
7+export BITCOIN_CONFIG="CC=clang-16 CXX=clang++-16 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0 -I/usr/lib/llvm-16/lib/clang/16/include'"
8 export CCACHE_SIZE=200M
See: https://cirrus-ci.com/task/5852229609979904
Some related discussion see in https://github.com/include-what-you-use/include-what-you-use/issues/679.
Note that even though the CI here is “green”, the tidy task has failed
#26763 is somewhat related.
This error can be fixed with the following diff:
I wonder if another workaround would be to use libc++, but I haven’t checked if the iwyu output is better or worse with libc++.
-I/usr/lib/llvm-16/lib/clang/16/include
Included this. I think we could merge this as-is, but should also figure out why it’s needed. It feels like there is another issue here.
Also #25466 (review)
Removed the related suppressions.
ACK https://github.com/bitcoin/bitcoin/pull/27404/commits/a56c96507a9e943bbcd7e126bc827de9495f0ebd
Included this. I think we could merge this as-is, but should also figure out why it’s needed. It feels like there is another issue here.
did a little digging and found this: https://github.com/include-what-you-use/include-what-you-use/issues/679#issuecomment-482798379 , which seems to still be an issue based on the discussion in the linked solution. fwiw, the fix you have here seems to be one of the preferred ways of dealing with this