1 .. title:: clang-tidy - llvmlibc-callee-namespace
3 llvmlibc-callee-namespace
4 ====================================
6 Checks all calls resolve to functions within correct namespace.
10 // Implementation inside the LIBC_NAMESPACE namespace.
12 // - LIBC_NAMESPACE is a macro
13 // - LIBC_NAMESPACE expansion starts with `__llvm_libc`
14 namespace LIBC_NAMESPACE {
16 // Allow calls with the fully qualified name.
17 LIBC_NAMESPACE::strlen("hello");
19 // Allow calls to compiler provided functions.
20 (void)__builtin_abs(-1);
22 // Bare calls are allowed as long as they resolve to the correct namespace.
25 // Disallow calling into functions in the global namespace.
28 } // namespace LIBC_NAMESPACE