[all-commits] [llvm/llvm-project] 155f5a: [libc][clang-tidy] fix namespace check for externals

michaelrj-google via All-commits all-commits at lists.llvm.org
Tue Nov 30 11:45:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 155f5a6dac62a902a30f60e2717c4ba8fb828139
      https://github.com/llvm/llvm-project/commit/155f5a6dac62a902a30f60e2717c4ba8fb828139
  Author: Michael Jones <michaelrj at google.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/llvmlibc-callee-namespace.cpp
    M libc/docs/clang_tidy_checks.rst
    M libc/src/__support/FPUtil/NearestIntegerOperations.h
    M libc/src/__support/str_to_float.h
    M libc/src/__support/str_to_integer.h
    M libc/src/math/generic/math_utils.h
    M libc/src/string/strdup.cpp
    M libc/src/string/strndup.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list