[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 08:37:01 PDT 2023


================
@@ -14,7 +14,9 @@ using namespace clang::ast_matchers;
 
 namespace clang::tidy::llvm_libc {
 
-const static StringRef RequiredNamespace = "__llvm_libc";
+const static StringRef RequiredNamespaceStart = "__llvm_libc";
+const static StringRef RequiredNamespaceMacroName = "LIBC_NAMESPACE";
+
 void ImplementationInNamespaceCheck::registerMatchers(MatchFinder *Finder) {
   Finder->addMatcher(
       decl(hasParent(translationUnitDecl()), unless(linkageSpecDecl()))
----------------
PiotrZSL wrote:

Maybe: hasParent -> hasDeclContext(translationUnitDecl())




https://github.com/llvm/llvm-project/pull/66504


More information about the cfe-commits mailing list