[libc-commits] [PATCH] D113946: [libc][clang-tidy] fix namespace check for externals
Aaron Ballman via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Nov 18 11:21:03 PST 2021
aaron.ballman added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:39
+// intercepted.
+static const llvm::StringSet<> FUNCTIONS_TO_IGNORE_NAMESPACE = {
+ "__errno_location", "malloc", "calloc", "realloc", "free"};
----------------
This is more in line with the coding style guidelines.
================
Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:40
+static const llvm::StringSet<> FUNCTIONS_TO_IGNORE_NAMESPACE = {
+ "__errno_location", "malloc", "calloc", "realloc", "free"};
+
----------------
Is there a reason that `aligned_alloc` function is excluded?
================
Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:55-57
+ if (FUNCTIONS_TO_IGNORE_NAMESPACE.contains(FuncDecl->getName())) {
+ return;
+ }
----------------
Style guideline nits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113946/new/
https://reviews.llvm.org/D113946
More information about the libc-commits
mailing list