After https://reviews.llvm.org/D144705, it is possible to run linting on the libc source code again. Because of the long time since we last did any formal lint checking, the source tree has regressed in a number of places with respect to code style. Also, the new LIBC_INLINE tag is missing in a number of places. This issue is about making the libc source lint clean so that we can start running linting on a CI builder.
Addressing this bug has to be a team effort as a large part of the source tree is affected. The best way to start doing the cleanup is this:
Build Clang and Clang-Tidy from head and install it into a special directory, say ~/libc-lint-tools/. You will have to install the following targets: install-clang, install-clang-tidy, install-core-resource-headers, install-clang-resource-headers, install-builtins.
Build any lint target, for example, libc.src.string.strlen.__lint__ or just execute the libc-lint target. They should you a large number of lint problems.
After https://reviews.llvm.org/D144705, it is possible to run linting on the libc source code again. Because of the long time since we last did any formal lint checking, the source tree has regressed in a number of places with respect to code style. Also, the new
LIBC_INLINE
tag is missing in a number of places. This issue is about making the libc source lint clean so that we can start running linting on a CI builder.Addressing this bug has to be a team effort as a large part of the source tree is affected. The best way to start doing the cleanup is this:
~/libc-lint-tools/
. You will have to install the following targets:install-clang
,install-clang-tidy
,install-core-resource-headers
,install-clang-resource-headers
,install-builtins
.libc.src.string.strlen.__lint__
or just execute thelibc-lint
target. They should you a large number of lint problems.