[libc-commits] [PATCH] D76744: [clang-tidy] Add check to ensure llvm-libc implementations are defined in correct namespace.
Paula Toth via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Mar 25 18:58:18 PDT 2020
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())
> Is there a rule that all libc implementation headers must have the extension `.h`. If not there is `utils::FileExtensionSet` that could be used.
> Alternatively you could just check to see if the SourceLocation is in the main file
> `if (!Result.SourceManager->isInMainFile(MatchedDecl->getLocation())`
Thanks for this! I incorporated your recommendations in the new patch. (:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits