[clang-tools-extra] [clang-tidy] Rename google-build-namespaces to misc-anonymous-namespace-in-header (PR #173484)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 24 04:30:21 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
Author: Manthan Singla (ThanSin02426)
<details>
<summary>Changes</summary>
This PR renames the check `google-build-namespaces` to `misc-anonymous-namespace-in-header` and adds documentation on why anonymous namespaces in headers are problematic.
Note: This is a continuation of PR #<!-- -->172611, which was closed and could not be reopened due to branch history changes.
---
Patch is 24.74 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/173484.diff
14 Files Affected:
- (modified) clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp (+2-2)
- (modified) clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp (+2-2)
- (modified) clang-tools-extra/clang-tidy/google/CMakeLists.txt (-1)
- (modified) clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp (+2-3)
- (renamed) clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.cpp (+6-6)
- (renamed) clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.h (+7-7)
- (modified) clang-tools-extra/clang-tidy/misc/CMakeLists.txt (+1)
- (modified) clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp (+3)
- (modified) clang-tools-extra/docs/ReleaseNotes.rst (+1)
- (modified) clang-tools-extra/docs/clang-tidy/checks/google/build-namespaces.rst (+3-8)
- (modified) clang-tools-extra/docs/clang-tidy/checks/list.rst (+14-17)
- (added) clang-tools-extra/docs/clang-tidy/checks/misc/anonymous-namespace-in-header.rst (+19)
- (added) clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/google-namespaces.h (+7)
- (renamed) clang-tools-extra/test/clang-tidy/checkers/misc/anonymous-namespace-in-header.cpp (+3-3)
``````````diff
diff --git a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
index 16d4be9802cc6..a9886e0be6741 100644
--- a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
@@ -31,7 +31,7 @@
#include "../bugprone/UnsafeFunctionsCheck.h"
#include "../bugprone/UnusedReturnValueCheck.h"
#include "../concurrency/ThreadCanceltypeAsynchronousCheck.h"
-#include "../google/UnnamedNamespaceInHeaderCheck.h"
+#include "../misc/AnonymousNamespaceInHeaderCheck.h"
#include "../misc/NewDeleteOverloadsCheck.h"
#include "../misc/NonCopyableObjectsCheck.h"
#include "../misc/PredictableRandCheck.h"
@@ -253,7 +253,7 @@ class CERTModule : public ClangTidyModule {
"cert-dcl54-cpp");
CheckFactories.registerCheck<bugprone::StdNamespaceModificationCheck>(
"cert-dcl58-cpp");
- CheckFactories.registerCheck<google::build::UnnamedNamespaceInHeaderCheck>(
+ CheckFactories.registerCheck<misc::AnonymousNamespaceInHeaderCheck>(
"cert-dcl59-cpp");
// ERR
CheckFactories.registerCheck<misc::ThrowByValueCatchByReferenceCheck>(
diff --git a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp b/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
index 284f72a8f20fd..b1b3b3fea56fe 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
@@ -9,7 +9,7 @@
#include "../ClangTidy.h"
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
-#include "../google/UnnamedNamespaceInHeaderCheck.h"
+#include "../misc/AnonymousNamespaceInHeaderCheck.h"
#include "../misc/MultipleInheritanceCheck.h"
#include "DefaultArgumentsCallsCheck.h"
#include "DefaultArgumentsDeclarationsCheck.h"
@@ -32,7 +32,7 @@ class FuchsiaModule : public ClangTidyModule {
"fuchsia-default-arguments-calls");
CheckFactories.registerCheck<DefaultArgumentsDeclarationsCheck>(
"fuchsia-default-arguments-declarations");
- CheckFactories.registerCheck<google::build::UnnamedNamespaceInHeaderCheck>(
+ CheckFactories.registerCheck<misc::AnonymousNamespaceInHeaderCheck>(
"fuchsia-header-anon-namespaces");
CheckFactories.registerCheck<misc::MultipleInheritanceCheck>(
"fuchsia-multiple-inheritance");
diff --git a/clang-tools-extra/clang-tidy/google/CMakeLists.txt b/clang-tools-extra/clang-tidy/google/CMakeLists.txt
index 982a188e8e808..2441bcd8e9c3d 100644
--- a/clang-tools-extra/clang-tidy/google/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/google/CMakeLists.txt
@@ -18,7 +18,6 @@ add_clang_library(clangTidyGoogleModule STATIC
IntegerTypesCheck.cpp
OverloadedUnaryAndCheck.cpp
TodoCommentCheck.cpp
- UnnamedNamespaceInHeaderCheck.cpp
UpgradeGoogletestCaseCheck.cpp
UsingNamespaceDirectiveCheck.cpp
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
index ce46b3f641790..68554da855633 100644
--- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
@@ -5,10 +5,10 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-
#include "../ClangTidy.h"
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
+#include "../misc/AnonymousNamespaceInHeaderCheck.h"
#include "../modernize/AvoidCStyleCastCheck.h"
#include "../readability/BracesAroundStatementsCheck.h"
#include "../readability/FunctionSizeCheck.h"
@@ -26,7 +26,6 @@
#include "IntegerTypesCheck.h"
#include "OverloadedUnaryAndCheck.h"
#include "TodoCommentCheck.h"
-#include "UnnamedNamespaceInHeaderCheck.h"
#include "UpgradeGoogletestCaseCheck.h"
#include "UsingNamespaceDirectiveCheck.h"
@@ -40,7 +39,7 @@ class GoogleModule : public ClangTidyModule {
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<build::ExplicitMakePairCheck>(
"google-build-explicit-make-pair");
- CheckFactories.registerCheck<build::UnnamedNamespaceInHeaderCheck>(
+ CheckFactories.registerCheck<misc::AnonymousNamespaceInHeaderCheck>(
"google-build-namespaces");
CheckFactories.registerCheck<build::UsingNamespaceDirectiveCheck>(
"google-build-using-namespace");
diff --git a/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp b/clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.cpp
similarity index 80%
rename from clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp
rename to clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.cpp
index 054bdc8d1230e..ed872b538db49 100644
--- a/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.cpp
@@ -6,26 +6,26 @@
//
//===----------------------------------------------------------------------===//
-#include "UnnamedNamespaceInHeaderCheck.h"
+#include "AnonymousNamespaceInHeaderCheck.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
using namespace clang::ast_matchers;
-namespace clang::tidy::google::build {
+namespace clang::tidy::misc {
-UnnamedNamespaceInHeaderCheck::UnnamedNamespaceInHeaderCheck(
+AnonymousNamespaceInHeaderCheck::AnonymousNamespaceInHeaderCheck(
StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
HeaderFileExtensions(Context->getHeaderFileExtensions()) {}
-void UnnamedNamespaceInHeaderCheck::registerMatchers(
+void AnonymousNamespaceInHeaderCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) {
Finder->addMatcher(namespaceDecl(isAnonymous()).bind("anonymousNamespace"),
this);
}
-void UnnamedNamespaceInHeaderCheck::check(
+void AnonymousNamespaceInHeaderCheck::check(
const MatchFinder::MatchResult &Result) {
const auto *N = Result.Nodes.getNodeAs<NamespaceDecl>("anonymousNamespace");
const SourceLocation Loc = N->getBeginLoc();
@@ -37,4 +37,4 @@ void UnnamedNamespaceInHeaderCheck::check(
diag(Loc, "do not use unnamed namespaces in header files");
}
-} // namespace clang::tidy::google::build
+} // namespace clang::tidy::misc
diff --git a/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h b/clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.h
similarity index 73%
rename from clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
rename to clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.h
index 78e8127a5a342..8a11a5833a416 100644
--- a/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.h
@@ -6,13 +6,13 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_UNNAMEDNAMESPACEINHEADERCHECK_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_UNNAMEDNAMESPACEINHEADERCHECK_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_ANONYMOUSNAMESPACEINHEADERCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_ANONYMOUSNAMESPACEINHEADERCHECK_H
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang::tidy::google::build {
+namespace clang::tidy::misc {
/// Finds anonymous namespaces in headers.
///
@@ -22,9 +22,9 @@ namespace clang::tidy::google::build {
///
/// For the user-facing documentation see:
/// https://clang.llvm.org/extra/clang-tidy/checks/google/build-namespaces.html
-class UnnamedNamespaceInHeaderCheck : public ClangTidyCheck {
+class AnonymousNamespaceInHeaderCheck : public ClangTidyCheck {
public:
- UnnamedNamespaceInHeaderCheck(StringRef Name, ClangTidyContext *Context);
+ AnonymousNamespaceInHeaderCheck(StringRef Name, ClangTidyContext *Context);
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
return LangOpts.CPlusPlus;
}
@@ -35,6 +35,6 @@ class UnnamedNamespaceInHeaderCheck : public ClangTidyCheck {
FileExtensionsSet HeaderFileExtensions;
};
-} // namespace clang::tidy::google::build
+} // namespace clang::tidy::misc
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_UNNAMEDNAMESPACEINHEADERCHECK_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_ANONYMOUSNAMESPACEINHEADERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/CMakeLists.txt b/clang-tools-extra/clang-tidy/misc/CMakeLists.txt
index 86643eb28d65a..e34b0cf687be3 100644
--- a/clang-tools-extra/clang-tidy/misc/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/misc/CMakeLists.txt
@@ -18,6 +18,7 @@ add_custom_target(genconfusable DEPENDS Confusables.inc)
set_target_properties(genconfusable PROPERTIES FOLDER "Clang Tools Extra/Sourcegenning")
add_clang_library(clangTidyMiscModule STATIC
+ AnonymousNamespaceInHeaderCheck.cpp
ConstCorrectnessCheck.cpp
CoroutineHostileRAIICheck.cpp
DefinitionsInHeadersCheck.cpp
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
index 36e545e06bb6d..14974783b0c5a 100644
--- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -9,6 +9,7 @@
#include "../ClangTidy.h"
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
+#include "AnonymousNamespaceInHeaderCheck.h"
#include "ConfusableIdentifierCheck.h"
#include "ConstCorrectnessCheck.h"
#include "CoroutineHostileRAIICheck.h"
@@ -42,6 +43,8 @@ namespace misc {
class MiscModule : public ClangTidyModule {
public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
+ CheckFactories.registerCheck<AnonymousNamespaceInHeaderCheck>(
+ "misc-anonymous-namespace-in-header");
CheckFactories.registerCheck<ConfusableIdentifierCheck>(
"misc-confusable-identifiers");
CheckFactories.registerCheck<ConstCorrectnessCheck>(
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 924b2c03cfd18..73c0ff770d659 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -255,6 +255,7 @@ New checks
Finds calls to STL library iterator algorithms that could be replaced with
LLVM range-based algorithms from ``llvm/ADT/STLExtras.h``.
+
- New :doc:`misc-override-with-different-visibility
<clang-tidy/checks/misc/override-with-different-visibility>` check.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/google/build-namespaces.rst b/clang-tools-extra/docs/clang-tidy/checks/google/build-namespaces.rst
index b421d992d63a6..9b8c350083331 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/google/build-namespaces.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/google/build-namespaces.rst
@@ -3,11 +3,6 @@
google-build-namespaces
=======================
-`cert-dcl59-cpp` redirects here as an alias for this check.
-`fuchsia-header-anon-namespaces` redirects here as an alias for this check.
-
-Finds anonymous namespaces in headers.
-
-https://google.github.io/styleguide/cppguide.html#Namespaces
-
-Corresponding cpplint.py check name: `build/namespaces`.
+The ``google-build-namespaces`` check is an alias, please see
+:doc:`misc-anonymous-namespace-in-header <../misc/anonymous-namespace-in-header>`
+for more information.
\ No newline at end of file
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index e5e77b5cc418b..6f0a523933408 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -180,11 +180,12 @@ Clang-Tidy Checks
:doc:`bugprone-unused-return-value <bugprone/unused-return-value>`,
:doc:`bugprone-use-after-move <bugprone/use-after-move>`,
:doc:`bugprone-virtual-near-miss <bugprone/virtual-near-miss>`, "Yes"
+ :doc:`cert-dcl58-cpp <cert/dcl58-cpp>`,
+ :doc:`cert-env33-c <cert/env33-c>`,
:doc:`cert-err33-c <cert/err33-c>`,
- :doc:`cert-err60-cpp <cert/err60-cpp>`,
+ :doc:`cert-err52-cpp <cert/err52-cpp>`,
:doc:`cert-flp30-c <cert/flp30-c>`,
- :doc:`cert-msc50-cpp <cert/msc50-cpp>`,
- :doc:`cert-oop58-cpp <cert/oop58-cpp>`,
+ :doc:`cert-mem57-cpp <cert/mem57-cpp>`,
:doc:`concurrency-mt-unsafe <concurrency/mt-unsafe>`,
:doc:`concurrency-thread-canceltype-asynchronous <concurrency/thread-canceltype-asynchronous>`,
:doc:`cppcoreguidelines-avoid-capturing-lambda-coroutines <cppcoreguidelines/avoid-capturing-lambda-coroutines>`,
@@ -222,13 +223,13 @@ Clang-Tidy Checks
:doc:`darwin-dispatch-once-nonstatic <darwin/dispatch-once-nonstatic>`, "Yes"
:doc:`fuchsia-default-arguments-calls <fuchsia/default-arguments-calls>`,
:doc:`fuchsia-default-arguments-declarations <fuchsia/default-arguments-declarations>`, "Yes"
+ :doc:`fuchsia-multiple-inheritance <fuchsia/multiple-inheritance>`,
:doc:`fuchsia-overloaded-operator <fuchsia/overloaded-operator>`,
:doc:`fuchsia-statically-constructed-objects <fuchsia/statically-constructed-objects>`,
:doc:`fuchsia-temporary-objects <fuchsia/temporary-objects>`,
:doc:`fuchsia-trailing-return <fuchsia/trailing-return>`,
:doc:`fuchsia-virtual-inheritance <fuchsia/virtual-inheritance>`,
:doc:`google-build-explicit-make-pair <google/build-explicit-make-pair>`,
- :doc:`google-build-namespaces <google/build-namespaces>`,
:doc:`google-build-using-namespace <google/build-using-namespace>`,
:doc:`google-default-arguments <google/default-arguments>`,
:doc:`google-explicit-constructor <google/explicit-constructor>`, "Yes"
@@ -238,6 +239,7 @@ Clang-Tidy Checks
:doc:`google-objc-function-naming <google/objc-function-naming>`,
:doc:`google-objc-global-variable-declaration <google/objc-global-variable-declaration>`,
:doc:`google-readability-avoid-underscore-in-googletest-name <google/readability-avoid-underscore-in-googletest-name>`,
+ :doc:`google-readability-casting <google/readability-casting>`,
:doc:`google-readability-todo <google/readability-todo>`,
:doc:`google-runtime-float <google/runtime-float>`,
:doc:`google-runtime-int <google/runtime-int>`,
@@ -262,6 +264,7 @@ Clang-Tidy Checks
:doc:`llvmlibc-implementation-in-namespace <llvmlibc/implementation-in-namespace>`,
:doc:`llvmlibc-inline-function-decl <llvmlibc/inline-function-decl>`, "Yes"
:doc:`llvmlibc-restrict-system-libc-headers <llvmlibc/restrict-system-libc-headers>`, "Yes"
+ :doc:`misc-anonymous-namespace-in-header <misc/anonymous-namespace-in-header>`, "Yes"
:doc:`misc-confusable-identifiers <misc/confusable-identifiers>`,
:doc:`misc-const-correctness <misc/const-correctness>`, "Yes"
:doc:`misc-coroutine-hostile-raii <misc/coroutine-hostile-raii>`,
@@ -290,7 +293,7 @@ Clang-Tidy Checks
:doc:`misc-use-internal-linkage <misc/use-internal-linkage>`, "Yes"
:doc:`modernize-avoid-bind <modernize/avoid-bind>`, "Yes"
:doc:`modernize-avoid-c-arrays <modernize/avoid-c-arrays>`,
- :doc:`modernize-avoid-c-style-cast <modernize/avoid-c-style-cast>`,
+ :doc:`modernize-avoid-c-style-cast <modernize/avoid-c-style-cast>`, "Yes"
:doc:`modernize-avoid-setjmp-longjmp <modernize/avoid-setjmp-longjmp>`,
:doc:`modernize-avoid-variadic-functions <modernize/avoid-variadic-functions>`,
:doc:`modernize-concat-nested-namespaces <modernize/concat-nested-namespaces>`, "Yes"
@@ -376,7 +379,7 @@ Clang-Tidy Checks
:doc:`readability-avoid-nested-conditional-operator <readability/avoid-nested-conditional-operator>`,
:doc:`readability-avoid-return-with-void-value <readability/avoid-return-with-void-value>`, "Yes"
:doc:`readability-avoid-unconditional-preprocessor-if <readability/avoid-unconditional-preprocessor-if>`,
- :doc:`readability-braces-around-statements <readability/braces-around-statements>`, "Yes"
+ :doc:`readability-braces-around-statements <readability/braces-around-statements>`,
:doc:`readability-const-return-type <readability/const-return-type>`, "Yes"
:doc:`readability-container-contains <readability/container-contains>`, "Yes"
:doc:`readability-container-data-pointer <readability/container-data-pointer>`, "Yes"
@@ -445,21 +448,16 @@ Check aliases
:doc:`cert-dcl50-cpp <cert/dcl50-cpp>`, :doc:`modernize-avoid-variadic-functions <modernize/avoid-variadic-functions>`,
:doc:`cert-dcl51-cpp <cert/dcl51-cpp>`, :doc:`bugprone-reserved-identifier <bugprone/reserved-identifier>`, "Yes"
:doc:`cert-dcl54-cpp <cert/dcl54-cpp>`, :doc:`misc-new-delete-overloads <misc/new-delete-overloads>`,
- :doc:`cert-dcl58-cpp <cert/dcl58-cpp>`, :doc:`bugprone-std-namespace-modification <bugprone/std-namespace-modification>`,
- :doc:`cert-dcl59-cpp <cert/dcl59-cpp>`, :doc:`google-build-namespaces <google/build-namespaces>`,
- :doc:`cert-env33-c <cert/env33-c>`, :doc:`bugprone-command-processor <bugprone/command-processor>`,
+ :doc:`cert-dcl59-cpp <cert/dcl59-cpp>`, :doc:`misc-anonymous-namespace-in-header <misc/anonymous-namespace-in-header>`,
:doc:`cert-err09-cpp <cert/err09-cpp>`, :doc:`misc-throw-by-value-catch-by-reference <misc/throw-by-value-catch-by-reference>`,
:doc:`cert-err34-c <cert/err34-c>`, :doc:`bugprone-unchecked-string-to-number-conversion <bugprone/unchecked-string-to-number-conversion>`,
- :doc:`cert-err52-cpp <cert/err52-cpp>`, :doc:`modernize-avoid-setjmp-longjmp <modernize/avoid-setjmp-longjmp>`,
:doc:`cert-err58-cpp <cert/err58-cpp>`, :doc:`bugprone-throwing-static-initialization <bugprone/throwing-static-initialization>`,
:doc:`cert-err60-cpp <cert/err60-cpp>`, :doc:`bugprone-exception-copy-constructor-throws <bugprone/exception-copy-constructor-throws>`,
:doc:`cert-err61-cpp <cert/err61-cpp>`, :doc:`misc-throw-by-value-catch-by-reference <misc/throw-by-value-catch-by-reference>`,
:doc:`cert-exp42-c <cert/exp42-c>`, :doc:`bugprone-suspicious-memory-comparison <bugprone/suspicious-memory-comparison>`,
:doc:`cert-fio38-c <cert/fio38-c>`, :doc:`misc-non-copyable-objects <misc/non-copyable-objects>`,
- :doc:`cert-flp30-c <cert/flp30-c>`, :doc:`bugprone-float-loop-counter <bugprone/float-loop-counter>`,
:doc:`cert-flp37-c <cert/flp37-c>`, :doc:`bugprone-suspicious-memory-comparison <bugprone/suspicious-memory-comparison>`,
:doc:`cert-int09-c <cert/int09-c>`, :doc:`readability-enum-initial-value <readability/enum-initial-value>`, "Yes"
- :doc:`cert-mem57-cpp <cert/mem57-cpp>`, :doc:`bugprone-default-operator-new-on-overaligned-type <bugprone/default-operator-new-on-overaligned-type>`,
:doc:`cert-msc24-c <cert/msc24-c>`, :doc:`bugprone-unsafe-functions <bugprone/unsafe-functions>`,
:doc:`cert-msc30-c <cert/msc30-c>`, :doc:`misc-predictable-rand <misc/predictable-rand>`,
:doc:`cert-msc32-c <cert/msc32-c>`, :doc:`bugprone-random-generator-seed <bugprone/random-generator-seed>`,
@@ -583,15 +581,14 @@ Check aliases
:doc:`cppcoreguidelines-noexcept-swap <cppcoreguidelines/noexcept-swap>`, :doc:`performance-noexcept-swap <performance/noexcept-swap>`, "Yes"
:doc:`cppcoreguidelines-non-private-member-variables-in-classes <cppcoreguidelines/non-private-member-variables-in-classes>`, :doc:`misc-non-private-member-variables-in-classes <misc/non-private-member-variables-in-classes>`,
:doc:`cppcoreguidelines-use-default-member-init <cppcoreguidelines/use-default-member-init>`, :doc:`modernize-use-default-member-init <modernize/use-default-member-init>`, "Yes"
- :doc:`fuchsia-header-anon-namespaces <fuchsia/header-anon-namespaces>`, :doc:`google-build-namespaces <google/build-namespaces>`,
- :doc:`fuchsia-multiple-inheritance <fuchsia/multiple-inheritance>`, :doc:`misc-multiple-inheritance <misc/multiple-inheritance>`,
- :doc:`google-readability-braces-around-statements <google/readability-braces-around-statements>`, :doc:`readability-braces-around-statements <readability/braces-around-statements>`, "Yes"
- :doc:`google-readability-casting <google/readability-casting>`, :doc:`modernize-avoid-c-style-cast <modernize/avoid-c-style-cast>`,
+ :doc:`fuchsia-header-anon-namespaces <fuchsia/header-anon-namespaces>`, :doc:`misc-anonymous-namespace-in-header <misc/anonymous-namespace-in-...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/173484
More information about the cfe-commits
mailing list