[libc-commits] [PATCH] D76818: [clang-tidy] Add check llvmlibc-implementation-in-namespace.

Paula Toth via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Mar 27 17:05:45 PDT 2020

PaulkaToast marked 3 inline comments as done.
PaulkaToast added a comment.

In D76818#1943781 <https://reviews.llvm.org/D76818#1943781>, @njames93 wrote:

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

Changed the check a bit so I'm not sure if pulling it out is still something desired, if so what module do you recommend this should live under?

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 {};
njames93 wrote:
> Small nit : Not a fan of the diagnostic saying `CXX Record`. Maybe a pain but `getDeclKindName` isn't the best to expose to users. 
Removed getDeclKindName as recommended.

  rG LLVM Github Monorepo



More information about the libc-commits mailing list