cppcheck
cppcheck copied to clipboard
iwyu.yml: work around missing includes for Fedora [skip ci]
In file included from /__w/cppcheck/cppcheck/externals/tinyxml2/tinyxml2.cpp:24:
In file included from /__w/cppcheck/cppcheck/externals/tinyxml2/tinyxml2.h:38:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/climits:47:
/usr/include/limits.h:124:16: fatal error: 'limits.h' file not found
124 | # include_next <limits.h>
|
This issue will pop up when a distro updates its LLVM to a newer version than IWYU is built against.
After the fix there is another issue when using libc++:
In file included from /__w/cppcheck/cppcheck/externals/tinyxml2/tinyxml2.cpp:31:
/usr/bin/../include/c++/v1/cstddef:45:5: error: <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
45 | # error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
| ^
After the fix there is another issue when using libc++:
I disabled that step for now...
See https://github.com/danmar/cppcheck/actions/runs/15956527702/job/45003567477 for a successful build with the changes applied.