[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-30 Thread Michael Jones via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG155f5a6dac62: [libc][clang-tidy] fix namespace check for externals (authored by michaelrj). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-30 Thread Michael Jones via Phabricator via cfe-commits
michaelrj updated this revision to Diff 390769. michaelrj added a comment. fix final comments before commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113946/new/ https://reviews.llvm.org/D113946 Files: clang-tools-extra/clang-tidy/llvmlibc/C

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from a tiny nit with the documentation. Comment at: libc/docs/clang_tidy_checks.rst:71 +There are exceptions for the following functions: +``__errno_location`` so that errno can be set +``malloc``,

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-19 Thread Michael Jones via Phabricator via cfe-commits
michaelrj updated this revision to Diff 388588. michaelrj marked 3 inline comments as done. michaelrj added a comment. address comments and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113946/new/ https://reviews.llvm.org/D113946 Files:

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-18 Thread Aaron Ballman via Phabricator via cfe-commits
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"};

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-18 Thread Michael Jones via Phabricator via cfe-commits
michaelrj added a comment. ping for clang-tidy review 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 ht

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-17 Thread Michael Jones via Phabricator via cfe-commits
michaelrj added inline comments. 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"}; sivachandra wr

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-16 Thread Michael Jones via Phabricator via cfe-commits
michaelrj updated this revision to Diff 387759. michaelrj marked an inline comment as done. michaelrj added a comment. update the set type Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113946/new/ https://reviews.llvm.org/D113946 Files: clang-to

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-16 Thread Siva Chandra via Phabricator via cfe-commits
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 *FU

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-16 Thread Michael Jones via Phabricator via cfe-commits
michaelrj updated this revision to Diff 387713. michaelrj added a comment. add test for the new lint behavior: Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113946/new/ https://reviews.llvm.org/D113946 Files: clang-tools-extra/clang-tidy/llvmlib

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-16 Thread Michael Jones via Phabricator via cfe-commits
michaelrj added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:13 +#include + sivachandra wrote: > Eugene.Zelenko wrote: > > Should be `` and without newline separation form rest of headers. > Looks like this is pr

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-16 Thread Michael Jones via Phabricator via cfe-commits
michaelrj updated this revision to Diff 387703. michaelrj marked 6 inline comments as done. michaelrj added a comment. clean up the code and remove debug statements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113946/new/ https://reviews.llvm.org/

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-15 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:1 //===-- CalleeNamespaceCheck.cpp --===// // You should add tests for this exception check. See https://gith

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:13 +#include + Should be `` and without newline separation form rest of headers. Comment at: clang-tools-extra/clang-tidy/llvml

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-15 Thread Tue Ly via Phabricator via cfe-commits
lntue added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:59 +llvm::StringRef(FUNCTIONS_TO_IGNORE_NAMESPACE[i]))) { + printf("String found %s\n", FuncDecl->getName().str().c_str()); + return; Loo

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-15 Thread Michael Jones via Phabricator via cfe-commits
michaelrj created this revision. michaelrj added reviewers: sivachandra, lntue. Herald added subscribers: libc-commits, carlosgalvezp, ecnelises, tschuett, xazax.hun. Herald added a project: libc-project. michaelrj requested review of this revision. Herald added a project: clang-tools-extra. Heral