forked from OSchip/llvm-project
[libc] Enable llvmlibc clang-tidy checks
Summary: Add clang-tidy for llvm-libc source directory. Example of check in action: ``` /workspace/llvm-project/libc/src/string/strcpy.cpp:10:1: error: system include stdio.h not allowed [llvmlibc-restrict-system-libc-headers,-warnings-as-errors] #include <stdio.h> ^~~~~~~~~~~~~~~~~~ ``` Reviewers: sivachandra, abrachet Reviewed By: sivachandra, abrachet Subscribers: aheejin, MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D76559
This commit is contained in:
parent
816ad48c82
commit
dab219eedd
|
@ -0,0 +1,6 @@
|
|||
Checks: '-*,llvmlibc-*'
|
||||
HeaderFilterRegex: '.*'
|
||||
WarningsAsErrors: 'llvmlibc-*'
|
||||
CheckOptions:
|
||||
- key: llvmlibc-restrict-system-libc-headers.Includes
|
||||
value: '-*, linux/*, asm/unistd.h'
|
|
@ -6,6 +6,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Include okay for this redirector.
|
||||
// NOLINTNEXTLINE(llvmlibc-restrict-system-libc-headers)
|
||||
#include <math.h>
|
||||
|
||||
namespace __llvm_libc {
|
||||
|
|
Loading…
Reference in New Issue