njames93 added a comment.

If you want to make it a general check, you should consider making the default 
module options set the correct namespace
RequiredNamespace

  ClangTidyOptions getModuleOptions() override {
    ClangTidyOptions Options;
    
Options.CheckOptions["llvmlibc-implementation-in-namespace.RequiredNamespace"] 
= "__llvm_libc";
    return Options;
  }



================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/llvmlibc-implementation-in-namespace.cpp:6
+class ClassB;
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: CXXRecord is not defined in a 
namespace, please wrap implentation in '__llvm_libc' namespace.
+struct StructC {};
----------------
Small nit : Not a fan of the diagnostic saying `CXX Record`. Maybe a pain but 
`getDeclKindName` isn't the best to expose to users. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76818/new/

https://reviews.llvm.org/D76818



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to