[PATCH] D76744: [clang-tidy] Add check to ensure llvm-libc implementations are defined in correct namespace.

2020-03-25 Thread Paula Toth via Phabricator via cfe-commits
PaulkaToast marked 3 inline comments as done. PaulkaToast added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/EntrypointNamespaceCheck.cpp:67 + if (Result.SourceManager->getFilename(MatchedDecl->getLocation()) + .endswith(".h")) +return;

[PATCH] D76744: [clang-tidy] Add check to ensure llvm-libc implementations are defined in correct namespace.

2020-03-25 Thread Paula Toth via Phabricator via cfe-commits
PaulkaToast abandoned this revision. PaulkaToast added a comment. Abandoning for a more generalized check. D76818 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76744/new/ https://reviews.llvm.org/D76744

[PATCH] D76744: [clang-tidy] Add check to ensure llvm-libc implementations are defined in correct namespace.

2020-03-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This check should only worry about the first declaration of the function, any redecls or the definition could appear outside the namespace like this: namespace blah{ void foo(); } void blah::foo(); void blah::foo(){} There are some missing test cases I'd

[PATCH] D76744: [clang-tidy] Add check to ensure llvm-libc implementations are defined in correct namespace.

2020-03-24 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra added a comment. Instead of this narrow check, what we really want is a check to ensure that all implementation detail resides in the namespace `__llvm_libc`. Anything outside would be special and requiring a `NOLINT...` for them is reasonable. Have you considered such an approach?

[PATCH] D76744: [clang-tidy] Add check to ensure llvm-libc implementations are defined in correct namespace.

2020-03-24 Thread Paula Toth via Phabricator via cfe-commits
PaulkaToast created this revision. PaulkaToast added a project: clang-tools-extra. Herald added subscribers: cfe-commits, MaskRay, xazax.hun, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76744 Files: