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

2024-07-11 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/98424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/98424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-11 Thread Paul Kirth via cfe-commits
ilovepi wrote: Also, as an FYI to reviewers, I'm working on the FixIts for these as a separate patch. https://github.com/llvm/llvm-project/pull/98424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

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

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

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

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

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

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

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

2024-07-11 Thread Piotr Zegar via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

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

2024-07-10 Thread Paul Kirth via cfe-commits
@@ -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 enclos

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

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) Changes This patch updates the clang-tidy checks for llvm-libc to ensure that the namespace macro used to declare the libc namespace is updated from LIBC_NAMESPACE to LIBC_N

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

2024-07-10 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/98424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-10 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/98424 This patch updates the clang-tidy checks for llvm-libc to ensure that the namespace macro used to declare the libc namespace is updated from LIBC_NAMESPACE to LIBC_NAMESPACE_DECL which by default has hidden visi