[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 20:00:14 PDT 2024


================
@@ -3,60 +3,61 @@
 #define MACRO_A "defining macros outside namespace is valid"
 
 class ClassB;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be enclosed within the 'LIBC_NAMESPACE' namespace
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be enclosed within the 'LIBC_NAMESPACE_DECL' namespace
 struct StructC {};
-// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: declaration must be enclosed within the 'LIBC_NAMESPACE' namespace
-char *VarD = MACRO_A;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be enclosed within the 'LIBC_NAMESPACE' namespace
+// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: declaration must be enclosed within the 'LIBC_NAMESPACE_DECL' namespace
+const char *VarD = MACRO_A;
----------------
ilovepi wrote:

I know this is a bit unrelated, but the tidy output was pretty polluted with warnings due to the lack of `const` here. When I manually ran the tidy command + Filecheck, it seemed to fail due to those warnings, so I just fixed those since I was changing these checks anyway.

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


More information about the cfe-commits mailing list