[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

Paula Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 15:00:43 PST 2020


PaulkaToast added a comment.

In D75332#1903570 <https://reviews.llvm.org/D75332#1903570>, @MaskRay wrote:

> > `RestrictSystemLibcHeadersCheck`
>
> As I commented previously, I think the checker name should be generalized, as it does not need to be coupled with llvm-libc. Other projects may have similar needs. For example, they don't want to accidentally include a system zlib.h -> they may ship a bundled zlib (say, in third_party/zlib/).
>
> Maybe `misc/` (or `portability/`) is more suitable?


This is a simple check made precisely for llvm libc's use-case and doesn't require a human maintained list. As I mentioned, if a more general/configurable check is desired then porting out the fuchsia-restrict-system-includes would make more sense as it already implements white-lists and would handle the situation you described.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75332/new/

https://reviews.llvm.org/D75332





More information about the cfe-commits mailing list