sivachandra accepted this revision. sivachandra added a comment. For libc requirements, LGTM. Please wait for @aaron.ballman for stamping the clang-tidy parts.
================ Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:39 +// intercepted. +static const char *FUNCTIONS_TO_IGNORE_NAMESPACE[] = { + "__errno_location", "malloc", "calloc", "realloc", "free"}; ---------------- michaelrj wrote: > sivachandra wrote: > > Eugene.Zelenko wrote: > > > Why not `std::array` of appropriate LLVM container? > > May be `static const std::uordered_set<llvm::StringRef>`? It would likely > > make the lookup below much neater. > an unordered set is a good idea, but the documentation for `StringRef` says > it's best not to use them for storage, so I went with `std::string` instead. > The code is still a lot nicer. Literal strings will not count as "storage". They are global data. On the other hand, `std::string` will make copies of the literals and require "storage". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113946/new/ https://reviews.llvm.org/D113946 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits