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.
Paths
| Differential D78890
[clang-tidy] Add check callee-namespace. ClosedPublic Authored by PaulkaToast on Apr 26 2020, 7:21 PM.
Details 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.
Diff Detail
Event TimelineEugene.Zelenko added inline comments. PaulkaToast marked 2 inline comments as done.
PaulkaToast marked 8 inline comments as done. PaulkaToast added inline comments.
Comment Actions LGTM aside from some minor nits.
This revision is now accepted and ready to land.Apr 28 2020, 11:04 AM PaulkaToast marked 3 inline comments as done. PaulkaToast added inline comments.
Closed by commit rG8683f5de5352: [clang-tidy] Add check callee-namespace. (authored by PaulkaToast). · Explain WhyApr 28 2020, 5:50 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 260524 clang-tools-extra/clang-tidy/llvmlibc/CMakeLists.txt
clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.h
clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp
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
clang-tools-extra/test/clang-tidy/checkers/llvmlibc-callee-namespace.cpp
|
Under what circumstances could the translation unit be passed in as the declaration? I think this code can just be removed.