[clang-tidy] Add check callee-namespace.
authorPaula Toth <paulatoth@google.com>
Wed, 29 Apr 2020 00:22:16 +0000 (17:22 -0700)
committerPaula Toth <paulatoth@google.com>
Wed, 29 Apr 2020 00:22:23 +0000 (17:22 -0700)
commit8683f5de535274398a82ed0a2c9f05648dc43f41
tree7a35908ea5d99cd3aa3afc527a9177f388673c7b
parent62b8f32f7699807ec61c81e2ffceae584a7e6219
[clang-tidy] Add check callee-namespace.

Summary:
This check will ensure that all calls to functions resolve to one inside the `__llvm_libc` namespace.

This is done to ensure that if we include a public header then we don't accidentally call into the a function within the global namespace.

Reviewers: aaron.ballman, njames93

Reviewed By: aaron.ballman

Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits, sivachandra

Tags: #clang-tools-extra, #libc-project, #clang

Differential Revision: https://reviews.llvm.org/D78890
clang-tools-extra/clang-tidy/llvmlibc/CMakeLists.txt
clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/llvmlibc/LLVMLibcTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/llvmlibc-callee-namespace.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/llvmlibc-callee-namespace.cpp [new file with mode: 0644]