llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-tools-extra Author: Zeyi Xu (zeyi2) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/197354.diff 18 Files Affected: - (modified) clang-tools-extra/clang-tidy/CMakeLists.txt (-2) - (modified) clang-tools-extra/clang-tidy/ClangTidyForceLinker.h (-5) - (removed) clang-tools-extra/clang-tidy/hicpp/CMakeLists.txt (-33) - (removed) clang-tools-extra/clang-tidy/hicpp/HICPPTidyModule.cpp (-55) - (removed) clang-tools-extra/clang-tidy/hicpp/LICENSE.TXT (-13) - (modified) clang-tools-extra/clangd/TidyFastChecks.inc (-7) - (modified) clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp (+2-2) - (modified) clang-tools-extra/docs/ReleaseNotes.rst (+14) - (removed) clang-tools-extra/docs/clang-tidy/checks/hicpp/uppercase-literal-suffix.rst (-11) - (removed) clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-default.rst (-7) - (removed) clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-delete.rst (-8) - (removed) clang-tools-extra/docs/clang-tidy/checks/hicpp/use-noexcept.rst (-8) - (removed) clang-tools-extra/docs/clang-tidy/checks/hicpp/use-nullptr.rst (-8) - (removed) clang-tools-extra/docs/clang-tidy/checks/hicpp/use-override.rst (-8) - (removed) clang-tools-extra/docs/clang-tidy/checks/hicpp/vararg.rst (-9) - (modified) clang-tools-extra/docs/clang-tidy/checks/list.rst (-8) - (modified) clang-tools-extra/docs/clang-tidy/checks/readability/uppercase-literal-suffix.rst (-2) - (modified) clang-tools-extra/docs/clang-tidy/index.rst (-1) ``````````diff diff --git a/clang-tools-extra/clang-tidy/CMakeLists.txt b/clang-tools-extra/clang-tidy/CMakeLists.txt index 153356245cfd1..9ee9255fbe17b 100644 --- a/clang-tools-extra/clang-tidy/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/CMakeLists.txt @@ -62,7 +62,6 @@ add_subdirectory(custom) add_subdirectory(darwin) add_subdirectory(fuchsia) add_subdirectory(google) -add_subdirectory(hicpp) add_subdirectory(linuxkernel) add_subdirectory(llvm) add_subdirectory(llvmlibc) @@ -89,7 +88,6 @@ set(ALL_CLANG_TIDY_CHECKS clangTidyDarwinModule clangTidyFuchsiaModule clangTidyGoogleModule - clangTidyHICPPModule clangTidyLinuxKernelModule clangTidyLLVMModule clangTidyLLVMLibcModule diff --git a/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h b/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h index 79244668856c1..2450384016e25 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h +++ b/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h @@ -75,11 +75,6 @@ extern volatile int GoogleModuleAnchorSource; [[maybe_unused]] static int GoogleModuleAnchorDestination = GoogleModuleAnchorSource; -// This anchor is used to force the linker to link the HICPPModule. -extern volatile int HICPPModuleAnchorSource; -[[maybe_unused]] static int HICPPModuleAnchorDestination = - HICPPModuleAnchorSource; - // This anchor is used to force the linker to link the LinuxKernelModule. extern volatile int LinuxKernelModuleAnchorSource; [[maybe_unused]] static int LinuxKernelModuleAnchorDestination = diff --git a/clang-tools-extra/clang-tidy/hicpp/CMakeLists.txt b/clang-tools-extra/clang-tidy/hicpp/CMakeLists.txt deleted file mode 100644 index 613b2e5962668..0000000000000 --- a/clang-tools-extra/clang-tidy/hicpp/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -set(LLVM_LINK_COMPONENTS - FrontendOpenMP - Support - ) - -add_clang_library(clangTidyHICPPModule STATIC - HICPPTidyModule.cpp - - LINK_LIBS - clangTidy - clangTidyBugproneModule - clangTidyCppCoreGuidelinesModule - clangTidyGoogleModule - clangTidyMiscModule - clangTidyModernizeModule - clangTidyPerformanceModule - clangTidyPortabilityModule - clangTidyReadabilityModule - clangTidyUtils - - DEPENDS - omp_gen - ClangDriverOptions - ) - -clang_target_link_libraries(clangTidyHICPPModule - PRIVATE - clangAST - clangASTMatchers - clangBasic - clangLex - clangSerialization - ) diff --git a/clang-tools-extra/clang-tidy/hicpp/HICPPTidyModule.cpp b/clang-tools-extra/clang-tidy/hicpp/HICPPTidyModule.cpp deleted file mode 100644 index bc399308c4bc2..0000000000000 --- a/clang-tools-extra/clang-tidy/hicpp/HICPPTidyModule.cpp +++ /dev/null @@ -1,55 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "../ClangTidy.h" -#include "../ClangTidyModule.h" -#include "../cppcoreguidelines/ProTypeVarargCheck.h" -#include "../modernize/UseEqualsDefaultCheck.h" -#include "../modernize/UseEqualsDeleteCheck.h" -#include "../modernize/UseNoexceptCheck.h" -#include "../modernize/UseNullptrCheck.h" -#include "../modernize/UseOverrideCheck.h" -#include "../readability/UppercaseLiteralSuffixCheck.h" - -namespace clang::tidy { -namespace hicpp { -namespace { - -class HICPPModule : public ClangTidyModule { -public: - void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { - CheckFactories.registerCheck<modernize::UseEqualsDefaultCheck>( - "hicpp-use-equals-default"); - CheckFactories.registerCheck<modernize::UseEqualsDeleteCheck>( - "hicpp-use-equals-delete"); - CheckFactories.registerCheck<modernize::UseNoexceptCheck>( - "hicpp-use-noexcept"); - CheckFactories.registerCheck<modernize::UseNullptrCheck>( - "hicpp-use-nullptr"); - CheckFactories.registerCheck<modernize::UseOverrideCheck>( - "hicpp-use-override"); - CheckFactories.registerCheck<readability::UppercaseLiteralSuffixCheck>( - "hicpp-uppercase-literal-suffix"); - CheckFactories.registerCheck<cppcoreguidelines::ProTypeVarargCheck>( - "hicpp-vararg"); - } -}; - -} // namespace - -// Register the HICPPModule using this statically initialized variable. -static ClangTidyModuleRegistry::Add<HICPPModule> - X("hicpp-module", "Adds High-Integrity C++ checks."); - -} // namespace hicpp - -// This anchor is used to force the linker to link in the generated object file -// and thus register the HICPPModule. -volatile int HICPPModuleAnchorSource = 0; // NOLINT(misc-use-internal-linkage) - -} // namespace clang::tidy diff --git a/clang-tools-extra/clang-tidy/hicpp/LICENSE.TXT b/clang-tools-extra/clang-tidy/hicpp/LICENSE.TXT deleted file mode 100644 index 2f30d1fa08f5e..0000000000000 --- a/clang-tools-extra/clang-tidy/hicpp/LICENSE.TXT +++ /dev/null @@ -1,13 +0,0 @@ ------------------------------------------------------------------------------- -clang-tidy High-Integrity C++ Files ------------------------------------------------------------------------------- -All clang-tidy files are licensed under the same terms as the rest of the LLVM -project with the following additions: - -Any file referencing a High-Integrity C++ Coding guideline: - -HIC++ Coding Standard as created by PRQA. - -Please see -https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/conditions-of-use -for more information. diff --git a/clang-tools-extra/clangd/TidyFastChecks.inc b/clang-tools-extra/clangd/TidyFastChecks.inc index c32a10ce0d9c5..e36ed8f383a0d 100644 --- a/clang-tools-extra/clangd/TidyFastChecks.inc +++ b/clang-tools-extra/clangd/TidyFastChecks.inc @@ -272,13 +272,6 @@ FAST(google-runtime-float, 1.0) FAST(google-runtime-int, 2.0) FAST(google-runtime-operator, 1.0) FAST(google-upgrade-googletest-case, 1.0) -FAST(hicpp-uppercase-literal-suffix, 0.0) -FAST(hicpp-use-equals-default, 2.0) -FAST(hicpp-use-equals-delete, -2.0) -FAST(hicpp-use-noexcept, 2.0) -FAST(hicpp-use-nullptr, 1.0) -FAST(hicpp-use-override, 1.0) -FAST(hicpp-vararg, -0.0) FAST(linuxkernel-must-check-errs, 0.0) FAST(llvm-else-after-return, 2.0) FAST(llvm-header-guard, 0.0) diff --git a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp index 861f3a7973a5a..4258f7faf34fd 100644 --- a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp +++ b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp @@ -264,10 +264,10 @@ TEST(DiagnosticsTest, DeduplicatedClangTidyDiagnostics) { float foo = [[0.1f]]; )cpp"); auto TU = TestTU::withCode(Test.code()); - // Enable alias clang-tidy checks, these check emits the same diagnostics + // Enable alias clang-tidy checks, these checks emit the same diagnostics // (except the check name). TU.ClangTidyProvider = addTidyChecks("readability-uppercase-literal-suffix," - "hicpp-uppercase-literal-suffix"); + "cert-dcl16-c"); // Verify that we filter out the duplicated diagnostic message. EXPECT_THAT( TU.build().getDiagnostics(), diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 34d9d90c70a47..3725df49be0fe 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -103,12 +103,26 @@ Potentially Breaking Changes <clang-tidy/checks/cppcoreguidelines/special-member-functions>` ``hicpp-static-assert`` :doc:`misc-static-assert <clang-tidy/checks/misc/static-assert>` + ``hicpp-uppercase-literal-suffix`` :doc:`readability-uppercase-literal-suffix + <clang-tidy/checks/readability/uppercase-literal-suffix>` ``hicpp-undelegated-constructor`` :doc:`bugprone-undelegated-constructor <clang-tidy/checks/bugprone/undelegated-constructor>` ``hicpp-use-auto`` :doc:`modernize-use-auto <clang-tidy/checks/modernize/use-auto>` ``hicpp-use-emplace`` :doc:`modernize-use-emplace <clang-tidy/checks/modernize/use-emplace>` + ``hicpp-use-equals-default`` :doc:`modernize-use-equals-default + <clang-tidy/checks/modernize/use-equals-default>` + ``hicpp-use-equals-delete`` :doc:`modernize-use-equals-delete + <clang-tidy/checks/modernize/use-equals-delete>` + ``hicpp-use-noexcept`` :doc:`modernize-use-noexcept + <clang-tidy/checks/modernize/use-noexcept>` + ``hicpp-use-nullptr`` :doc:`modernize-use-nullptr + <clang-tidy/checks/modernize/use-nullptr>` + ``hicpp-use-override`` :doc:`modernize-use-override + <clang-tidy/checks/modernize/use-override>` + ``hicpp-vararg`` :doc:`cppcoreguidelines-pro-type-vararg + <clang-tidy/checks/cppcoreguidelines/pro-type-vararg>` ================================== ======================================================================== Improvements to clangd diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/uppercase-literal-suffix.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/uppercase-literal-suffix.rst deleted file mode 100644 index 93447797296f7..0000000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/uppercase-literal-suffix.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. title:: clang-tidy - hicpp-uppercase-literal-suffix - -hicpp-uppercase-literal-suffix -============================== - -The hicpp-uppercase-literal-suffix check is an alias, please see -:doc:`readability-uppercase-literal-suffix -<../readability/uppercase-literal-suffix>` for more information. - -Partially implements `rule 4.2.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-rules>`_ -to ensure that the ``U`` suffix is writeln properly. diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-default.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-default.rst deleted file mode 100644 index e3182e144e498..0000000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-default.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. title:: clang-tidy - hicpp-use-equals-defaults - -hicpp-use-equals-default -======================== - -This check is an alias for :doc:`modernize-use-equals-default <../modernize/use-equals-default>`. -Implements `rule 12.5.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-rules>`_ to explicitly default special member functions. diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-delete.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-delete.rst deleted file mode 100644 index f539b54e88106..0000000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-equals-delete.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. title:: clang-tidy - hicpp-use-equals-delete - -hicpp-use-equals-delete -======================= - -This check is an alias for :doc:`modernize-use-equals-delete <../modernize/use-equals-delete>`. -Implements `rule 12.5.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-rules>`_ -to explicitly default or delete special member functions. diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-noexcept.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-noexcept.rst deleted file mode 100644 index 5480c3b5a32d3..0000000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-noexcept.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. title:: clang-tidy - hicpp-use-noexcept - -hicpp-use-noexcept -================== - -The `hicpp-use-noexcept` check is an alias, please see -:doc:`modernize-use-noexcept <../modernize/use-noexcept>` for more information. -It enforces the `rule 1.3.5 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-rules>`_. diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-nullptr.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-nullptr.rst deleted file mode 100644 index 96ec5749d81b4..0000000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-nullptr.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. title:: clang-tidy - hicpp-use-nullptr - -hicpp-use-nullptr -================= - -The `hicpp-use-nullptr` check is an alias, please see -:doc:`modernize-use-nullptr <../modernize/use-nullptr>` for more information. -It enforces the `rule 2.5.3 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-rules>`_. diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-override.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-override.rst deleted file mode 100644 index dadf9db64f3b7..0000000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/use-override.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. title:: clang-tidy - hicpp-use-override - -hicpp-use-override -================== - -This check is an alias for :doc:`modernize-use-override <../modernize/use-override>`. -Implements `rule 10.2.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-rules>`_ to -declare a virtual function `override` when overriding. diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/vararg.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/vararg.rst deleted file mode 100644 index fcfcb0b8b807c..0000000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/vararg.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. title:: clang-tidy - hicpp-vararg - -hicpp-vararg -============ - -The `hicpp-vararg` check is an alias, please see -:doc:`cppcoreguidelines-pro-type-vararg <../cppcoreguidelines/pro-type-vararg>` -for more information. -It enforces the `rule 14.1.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-rules>`_. diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index 96b8231d2b618..c3d313663dc03 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -19,7 +19,6 @@ Clang-Tidy Checks darwin/* fuchsia/* google/* - hicpp/* linuxkernel/* llvm/* llvmlibc/* @@ -604,13 +603,6 @@ Check aliases :doc:`google-readability-casting <google/readability-casting>`, :doc:`modernize-avoid-c-style-cast <modernize/avoid-c-style-cast>`, "Yes" :doc:`google-readability-function-size <google/readability-function-size>`, :doc:`readability-function-size <readability/function-size>`, :doc:`google-readability-namespace-comments <google/readability-namespace-comments>`, :doc:`llvm-namespace-comment <llvm/namespace-comment>`, - :doc:`hicpp-uppercase-literal-suffix <hicpp/uppercase-literal-suffix>`, :doc:`readability-uppercase-literal-suffix <readability/uppercase-literal-suffix>`, "Yes" - :doc:`hicpp-use-equals-default <hicpp/use-equals-default>`, :doc:`modernize-use-equals-default <modernize/use-equals-default>`, "Yes" - :doc:`hicpp-use-equals-delete <hicpp/use-equals-delete>`, :doc:`modernize-use-equals-delete <modernize/use-equals-delete>`, "Yes" - :doc:`hicpp-use-noexcept <hicpp/use-noexcept>`, :doc:`modernize-use-noexcept <modernize/use-noexcept>`, "Yes" - :doc:`hicpp-use-nullptr <hicpp/use-nullptr>`, :doc:`modernize-use-nullptr <modernize/use-nullptr>`, "Yes" - :doc:`hicpp-use-override <hicpp/use-override>`, :doc:`modernize-use-override <modernize/use-override>`, "Yes" - :doc:`hicpp-vararg <hicpp/vararg>`, :doc:`cppcoreguidelines-pro-type-vararg <cppcoreguidelines/pro-type-vararg>`, :doc:`llvm-else-after-return <llvm/else-after-return>`, :doc:`readability-else-after-return <readability/else-after-return>`, "Yes" :doc:`llvm-qualified-auto <llvm/qualified-auto>`, :doc:`readability-qualified-auto <readability/qualified-auto>`, "Yes" :doc:`performance-faster-string-find <performance/faster-string-find>`, :doc:`performance-prefer-single-char-overloads <performance/prefer-single-char-overloads>`, "Yes" diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability/uppercase-literal-suffix.rst b/clang-tools-extra/docs/clang-tidy/checks/readability/uppercase-literal-suffix.rst index dcedfb10c05b6..ea254bd4c234e 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/readability/uppercase-literal-suffix.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/readability/uppercase-literal-suffix.rst @@ -7,8 +7,6 @@ readability-uppercase-literal-suffix By default, only the suffixes that begin with ``l`` (``l``, ``ll``, ``lu``, ``llu``, but not ``u``, ``ul``, ``ull``) are diagnosed by that alias. -`hicpp-uppercase-literal-suffix` redirects here as an alias for this check. - Detects when the integral literal or floating point (decimal or hexadecimal) literal has a non-uppercase suffix and provides a fix-it hint with the uppercase suffix. diff --git a/clang-tools-extra/docs/clang-tidy/index.rst b/clang-tools-extra/docs/clang-tidy/index.rst index db7f2deade9ca..908dee6c18a7f 100644 --- a/clang-tools-extra/docs/clang-tidy/index.rst +++ b/clang-tools-extra/docs/clang-tidy/index.rst @@ -80,7 +80,6 @@ Name prefix Description ``darwin-`` Checks related to Darwin coding conventions. ``fuchsia-`` Checks related to Fuchsia coding conventions. ``google-`` Checks related to Google coding conventions. -``hicpp-`` Checks related to High Integrity C++ Coding Standard. ``linuxkernel-`` Checks related to the Linux Kernel coding conventions. ``llvm-`` Checks related to the LLVM coding conventions. ``llvmlibc-`` Checks related to the LLVM-libc coding standards. `````````` </details> https://github.com/llvm/llvm-project/pull/197354 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
