Open
Description
opened on Jan 22, 2024
Summary
In early 2024, the R package was almost archived on CRAN because of a compiler warning from clang-18
resulting from an unnecessary #include <string>
.
ref: #6264
This project should test running include-what-you-use
(https://github.com/include-what-you-use/include-what-you-use) in CI to catch such things earlier.
Motivation
Removing unused includes in C/C++ code could have the following benefits:
- smaller binary size
- reduced risk of runtime failures caused by irrelevant ABI breakages
- reducing build / linking times
- reduced effort required to update to new C++ standards
Description
Consider adding that to the cpp_tests
CI jobs, and maybe to the R-package CMake CI jobs.
Try reverting the change from #6265 and test if include-what-you-use
would have caught it.
References
See the documentation at https://github.com/include-what-you-use/include-what-you-use?tab=readme-ov-file#using-with-cmake.
Activity