1 .. title:: clang-tidy - llvmlibc-implementation-in-namespace
3 llvmlibc-implementation-in-namespace
4 ====================================
6 Checks that all declarations in the llvm-libc implementation are within the
11 // Correct: implementation inside the correct namespace.
12 namespace __llvm_libc {
13 void LLVM_LIBC_ENTRYPOINT(strcpy)(char *dest, const char *src) {}
14 // Namespaces within __llvm_libc namespace are allowed.
18 // Functions with C linkage are allowed.
19 extern "C" void str_fuzz(){}
22 // Incorrect: implementation not in a namespace.
23 void LLVM_LIBC_ENTRYPOINT(strcpy)(char *dest, const char *src) {}
25 // Incorrect: outer most namespace is not correct.
26 namespace something_else {
27 void LLVM_LIBC_ENTRYPOINT(strcpy)(char *dest, const char *src) {}