clang-tools 20.0.0git
Classes | Functions | Variables
clang::tidy::llvm_libc Namespace Reference

Classes

class  CalleeNamespaceCheck
 Checks all calls resolve to functions within __llvm_libc namespace. More...
 
class  ImplementationInNamespaceCheck
 Checks all llvm-libc implementation is within the correct namespace. More...
 
class  InlineFunctionDeclCheck
 Checks that explicitly and implicitly inline functions in headers files are tagged with the LIBC_INLINE macro. More...
 
class  LLVMLibcModule
 
class  RestrictSystemLibcHeadersCheck
 Warns of accidental inclusions of system libc headers that aren't compiler provided. More...
 

Functions

const DeclContext * getOutermostNamespace (const DeclContext *Decl)
 
static ClangTidyModuleRegistry::Add< LLVMLibcModuleX ("llvmlibc-module", "Adds LLVM libc standards checks.")
 

Variables

static const llvm::StringSet IgnoredFunctions
 
static const llvm::StringRef RequiredNamespaceRefStart = "__llvm_libc"
 
static const llvm::StringRef RequiredNamespaceRefMacroName = "LIBC_NAMESPACE"
 
static const llvm::StringRef RequiredNamespaceDeclStart
 
static const llvm::StringRef RequiredNamespaceDeclMacroName
 

Function Documentation

◆ getOutermostNamespace()

const DeclContext * clang::tidy::llvm_libc::getOutermostNamespace ( const DeclContext *  Decl)

◆ X()

static ClangTidyModuleRegistry::Add< LLVMLibcModule > clang::tidy::llvm_libc::X ( "llvmlibc-module"  ,
"Adds LLVM libc standards checks."   
)
static

Variable Documentation

◆ IgnoredFunctions

const llvm::StringSet clang::tidy::llvm_libc::IgnoredFunctions
static
Initial value:
= {
"__errno_location", "malloc", "calloc", "realloc", "free", "aligned_alloc"}

Definition at line 39 of file CalleeNamespaceCheck.cpp.

Referenced by clang::tidy::llvm_libc::CalleeNamespaceCheck::check().

◆ RequiredNamespaceDeclMacroName

const llvm::StringRef clang::tidy::llvm_libc::RequiredNamespaceDeclMacroName
static
Initial value:
=
"LIBC_NAMESPACE_DECL"

Definition at line 17 of file NamespaceConstants.h.

Referenced by clang::tidy::llvm_libc::ImplementationInNamespaceCheck::check().

◆ RequiredNamespaceDeclStart

const llvm::StringRef clang::tidy::llvm_libc::RequiredNamespaceDeclStart
static
Initial value:
=
"[[gnu::visibility(\"hidden\")]] __llvm_libc"

Definition at line 15 of file NamespaceConstants.h.

Referenced by clang::tidy::llvm_libc::ImplementationInNamespaceCheck::check().

◆ RequiredNamespaceRefMacroName

const llvm::StringRef clang::tidy::llvm_libc::RequiredNamespaceRefMacroName = "LIBC_NAMESPACE"
static

◆ RequiredNamespaceRefStart

const llvm::StringRef clang::tidy::llvm_libc::RequiredNamespaceRefStart = "__llvm_libc"
static