[libc][clang-tidy] fix namespace check for externals
authorMichael Jones <michaelrj@google.com>
Mon, 15 Nov 2021 23:03:30 +0000 (15:03 -0800)
committerMichael Jones <michaelrj@google.com>
Tue, 30 Nov 2021 19:44:24 +0000 (11:44 -0800)
commit155f5a6dac62a902a30f60e2717c4ba8fb828139
treee559f9c68a81dbfd42d67ef52fee44bedaaa9366
parenta2ce97cc3f99c8af80b2325acf03a4c171ffb48f
[libc][clang-tidy] fix namespace check for externals

Up until now, all references to `errno` were marked with `NOLINT`, since
it was technically calling an external function. This fixes the lint
rules so that `errno`, as well as `malloc`, `calloc`, `realloc`, and
`free` are all allowed to be called as external functions. All of the
relevant `NOLINT` comments have been removed, and the documentation has
been updated.

Reviewed By: sivachandra, lntue, aaron.ballman

Differential Revision: https://reviews.llvm.org/D113946
clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/llvmlibc-callee-namespace.cpp
libc/docs/clang_tidy_checks.rst
libc/src/__support/FPUtil/NearestIntegerOperations.h
libc/src/__support/str_to_float.h
libc/src/__support/str_to_integer.h
libc/src/math/generic/math_utils.h
libc/src/string/strdup.cpp
libc/src/string/strndup.cpp