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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 07:39:54 PST 2020


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:40
+    SrcMgr::CharacteristicKind FileType) {
+  if (SrcMgr::isSystem(FileType)) {
+    if (!SM.isInMainFile(HashLoc)) {
----------------
njames93 wrote:
> abrachet wrote:
> > Could you whitelist the freestanding/compiler provided headers like stddef, stdatomic...
> Or have a user configurable whitelist 
It should be configurable and named something other than whitelist. I'd recommend `AllowedHeaders` or something along those lines.


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