forked from OSchip/llvm-project
[clang-tidy] add more aliases for the hicpp module
This patch will introduce even more aliases for the hicpp-module to already existing checks and is a follow up for D30383 finishing the other sections. It fixes a forgotten highlight in hicpp-braces-around-statements.rst, too. llvm-svn: 312901
This commit is contained in:
parent
6cb007fc72
commit
a735803801
|
@ -10,16 +10,26 @@
|
|||
#include "../ClangTidy.h"
|
||||
#include "../ClangTidyModule.h"
|
||||
#include "../ClangTidyModuleRegistry.h"
|
||||
#include "../cppcoreguidelines/NoMallocCheck.h"
|
||||
#include "../cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h"
|
||||
#include "../cppcoreguidelines/ProTypeMemberInitCheck.h"
|
||||
#include "../cppcoreguidelines/ProTypeVarargCheck.h"
|
||||
#include "../cppcoreguidelines/SpecialMemberFunctionsCheck.h"
|
||||
#include "../google/DefaultArgumentsCheck.h"
|
||||
#include "../google/ExplicitConstructorCheck.h"
|
||||
#include "../misc/MoveConstantArgumentCheck.h"
|
||||
#include "../misc/NewDeleteOverloadsCheck.h"
|
||||
#include "../misc/NoexceptMoveConstructorCheck.h"
|
||||
#include "../misc/StaticAssertCheck.h"
|
||||
#include "../misc/UndelegatedConstructor.h"
|
||||
#include "../misc/UseAfterMoveCheck.h"
|
||||
#include "../modernize/DeprecatedHeadersCheck.h"
|
||||
#include "../modernize/UseAutoCheck.h"
|
||||
#include "../modernize/UseEmplaceCheck.h"
|
||||
#include "../modernize/UseEqualsDefaultCheck.h"
|
||||
#include "../modernize/UseEqualsDeleteCheck.h"
|
||||
#include "../modernize/UseNoexceptCheck.h"
|
||||
#include "../modernize/UseNullptrCheck.h"
|
||||
#include "../modernize/UseOverrideCheck.h"
|
||||
#include "../readability/BracesAroundStatementsCheck.h"
|
||||
#include "../readability/FunctionSizeCheck.h"
|
||||
|
@ -37,6 +47,8 @@ public:
|
|||
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
|
||||
CheckFactories.registerCheck<readability::BracesAroundStatementsCheck>(
|
||||
"hicpp-braces-around-statements");
|
||||
CheckFactories.registerCheck<modernize::DeprecatedHeadersCheck>(
|
||||
"hicpp-deprecated-headers");
|
||||
CheckFactories.registerCheck<ExceptionBaseclassCheck>(
|
||||
"hicpp-exception-baseclass");
|
||||
CheckFactories.registerCheck<SignedBitwiseCheck>(
|
||||
|
@ -51,22 +63,40 @@ public:
|
|||
"hicpp-invalid-access-moved");
|
||||
CheckFactories.registerCheck<cppcoreguidelines::ProTypeMemberInitCheck>(
|
||||
"hicpp-member-init");
|
||||
CheckFactories.registerCheck<misc::MoveConstantArgumentCheck>(
|
||||
"hicpp-move-const-arg");
|
||||
CheckFactories.registerCheck<misc::NewDeleteOverloadsCheck>(
|
||||
"hicpp-new-delete-operators");
|
||||
CheckFactories.registerCheck<misc::NoexceptMoveConstructorCheck>(
|
||||
"hicpp-noexcept-move");
|
||||
CheckFactories
|
||||
.registerCheck<cppcoreguidelines::ProBoundsArrayToPointerDecayCheck>(
|
||||
"hicpp-no-array-decay");
|
||||
CheckFactories.registerCheck<NoAssemblerCheck>("hicpp-no-assembler");
|
||||
CheckFactories.registerCheck<cppcoreguidelines::NoMallocCheck>(
|
||||
"hicpp-no-malloc");
|
||||
CheckFactories
|
||||
.registerCheck<cppcoreguidelines::SpecialMemberFunctionsCheck>(
|
||||
"hicpp-special-member-functions");
|
||||
CheckFactories.registerCheck<misc::StaticAssertCheck>(
|
||||
"hicpp-static-assert");
|
||||
CheckFactories.registerCheck<modernize::UseAutoCheck>("hicpp-use-auto");
|
||||
CheckFactories.registerCheck<misc::UndelegatedConstructorCheck>(
|
||||
"hicpp-undelegated-constructor");
|
||||
CheckFactories.registerCheck<modernize::UseEmplaceCheck>(
|
||||
"hicpp-use-emplace");
|
||||
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<cppcoreguidelines::ProTypeVarargCheck>(
|
||||
"hicpp-vararg");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -142,7 +142,19 @@ Improvements to clang-tidy
|
|||
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html#cmdoption-arg-IgnoreImplicitConstructors>`_
|
||||
option.
|
||||
|
||||
- Added alias `hicpp-braces-around-statements <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-braces-around-statements.html>`_
|
||||
- Added aliases for the `High Integrity C++ Coding Standard <http://www.codingstandard.com/section/index/>`_
|
||||
to already implemented checks in other modules.
|
||||
|
||||
- `hicpp-deprecated-headers <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-deprecated-headers.html>`_
|
||||
- `hicpp-move-const-arg <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-move-const-arg.html>`_
|
||||
- `hicpp-no-array-decay <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-no-array-decay.html>`_
|
||||
- `hicpp-no-malloc <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-no-malloc.html>`_
|
||||
- `hicpp-static-assert <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-static-assert.html>`_
|
||||
- `hicpp-use-auto <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-use-auto.html>`_
|
||||
- `hicpp-use-emplace <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-use-emplace.html>`_
|
||||
- `hicpp-use-noexcept <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-use-noexcept.html>`_
|
||||
- `hicpp-use-nullptr <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-use-nullptr.html>`_
|
||||
- `hicpp-vararg <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-vararg.html>`_
|
||||
|
||||
Improvements to include-fixer
|
||||
-----------------------------
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
hicpp-braces-around-statements
|
||||
==============================
|
||||
|
||||
The hicpp-braces-around-statements check is an alias, please see
|
||||
The `hicpp-braces-around-statements` check is an alias, please see
|
||||
`readability-braces-around-statements <readability-braces-around-statements.html>`_
|
||||
for more information.
|
||||
It enforces the `rule 6.1.1 <http://www.codingstandard.com/rule/6-1-1-enclose-the-body-of-a-selection-or-an-iteration-statement-in-a-compound-statement/>`_.
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
.. title:: clang-tidy - hicpp-deprecated-headers
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=modernize-deprecated-headers.html
|
||||
|
||||
hicpp-deprecated-headers
|
||||
========================
|
||||
|
||||
The `hicpp-deprecated-headers` check is an alias, please see
|
||||
`modernize-deprecated-headers <modernize-deprecated-headers.html>`_
|
||||
for more information.
|
||||
It enforces the `rule 1.3.3 <http://www.codingstandard.com/rule/1-3-3-do-not-use-the-c-standard-library-h-headers/>`_.
|
|
@ -0,0 +1,10 @@
|
|||
.. title:: clang-tidy - hicpp-move-const-arg
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=misc-move-const-arg.html
|
||||
|
||||
hicpp-move-const-arg
|
||||
====================
|
||||
|
||||
The `hicpp-move-const-arg` check is an alias, please see
|
||||
`misc-move-const-arg <misc-move-const-arg.html>`_ for more information.
|
||||
It enforces the `rule 17.3.1 <http://www.codingstandard.com/rule/17-3-1-do-not-use-stdmove-on-objects-declared-with-const-or-const-type/>`_.
|
|
@ -0,0 +1,11 @@
|
|||
.. title:: clang-tidy - hicpp-no-array-decay
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=cppcoreguidelines-pro-bounds-array-to-pointer-decay.html
|
||||
|
||||
hicpp-no-array-decay
|
||||
====================
|
||||
|
||||
The `hicpp-no-array-decay` check is an alias, please see
|
||||
`cppcoreguidelines-pro-bounds-array-to-pointer-decay <cppcoreguidelines-pro-bounds-array-to-pointer-decay.html>`_
|
||||
for more information.
|
||||
It enforces the `rule 4.1.1 <http://www.codingstandard.com/section/4-1-array-to-pointer-conversion/>`_.
|
|
@ -0,0 +1,11 @@
|
|||
.. title:: clang-tidy - hicpp-no-malloc
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=cppcoreguidelines-no-malloc.html
|
||||
|
||||
hicpp-no-malloc
|
||||
===============
|
||||
|
||||
The `hicpp-no-malloc` check is an alias, please see
|
||||
`cppcoreguidelines-no-malloc <cppcoreguidelines-no-malloc.html>`_
|
||||
for more information.
|
||||
It enforces the `rule 5.3.2 <http://www.codingstandard.com/rule/5-3-2-allocate-memory-using-new-and-release-it-using-delete/>`_.
|
|
@ -0,0 +1,10 @@
|
|||
.. title:: clang-tidy - hicpp-static-assert
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=misc-static-assert.html
|
||||
|
||||
hicpp-static-assert
|
||||
===================
|
||||
|
||||
The `hicpp-static-assert` check is an alias, please see
|
||||
`misc-static-assert <misc-static-assert.html>`_ for more information.
|
||||
It enforces the `rule 7.1.10 <http://www.codingstandard.com/rule/6-1-1-enclose-the-body-of-a-selection-or-an-iteration-statement-in-a-compound-statement/>`_.
|
|
@ -0,0 +1,10 @@
|
|||
.. title:: clang-tidy - hicpp-use-auto
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=modernize-use-auto.html
|
||||
|
||||
hicpp-use-auto
|
||||
==============
|
||||
|
||||
The `hicpp-use-auto` check is an alias, please see
|
||||
`modernize-use-auto <modernize-use-auto.html>`_ for more information.
|
||||
It enforces the `rule 7.1.8 <http://www.codingstandard.com/rule/7-1-8-use-auto-id-expr-when-declaring-a-variable-to-have-the-same-type-as-its-initializer-function-call/>`_.
|
|
@ -0,0 +1,10 @@
|
|||
.. title:: clang-tidy - hicpp-use-emplace
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=modernize-use-emplace.html
|
||||
|
||||
hicpp-use-emplace
|
||||
=================
|
||||
|
||||
The `hicpp-use-emplace` check is an alias, please see
|
||||
`modernize-use-emplace <modernize-use-emplace.html>`_ for more information.
|
||||
It enforces the `rule 17.4.2 <http://www.codingstandard.com/rule/17-4-2-use-api-calls-that-construct-objects-in-place/>`_.
|
|
@ -0,0 +1,10 @@
|
|||
.. title:: clang-tidy - hicpp-use-noexcept
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=modernize-use-noexcept.html
|
||||
|
||||
hicpp-use-noexcept
|
||||
==================
|
||||
|
||||
The `hicpp-use-noexcept` check is an alias, please see
|
||||
`modernize-use-noexcept <modernize-use-noexcept.html>`_ for more information.
|
||||
It enforces the `rule 1.3.5 <http://www.codingstandard.com/rule/1-3-5-do-not-use-throw-exception-specifications/>`_.
|
|
@ -0,0 +1,10 @@
|
|||
.. title:: clang-tidy - hicpp-use-nullptr
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=modernize-use-nullptr.html
|
||||
|
||||
hicpp-use-nullptr
|
||||
=================
|
||||
|
||||
The `hicpp-use-nullptr` check is an alias, please see
|
||||
`modernize-use-nullptr <modernize-use-nullptr.html>`_ for more information.
|
||||
It enforces the `rule 2.5.3 <http://www.codingstandard.com/rule/2-5-3-use-nullptr-for-the-null-pointer-constant/>`_.
|
|
@ -0,0 +1,11 @@
|
|||
.. title:: clang-tidy - hicpp-vararg
|
||||
.. meta::
|
||||
:http-equiv=refresh: 5;URL=cppcoreguidelines-pro-type-vararg.html
|
||||
|
||||
hicpp-vararg
|
||||
============
|
||||
|
||||
The `hicpp-vararg` check is an alias, please see
|
||||
`cppcoreguidelines-pro-type-vararg <cppcoreguidelines-pro-type-vararg.html>`_
|
||||
for more information.
|
||||
It enforces the `rule 14.1.1 <http://www.codingstandard.com/section/14-1-template-declarations/>`_.
|
|
@ -70,21 +70,31 @@ Clang-Tidy Checks
|
|||
google-runtime-operator
|
||||
google-runtime-references
|
||||
hicpp-braces-around-statements (redirects to readability-braces-around-statements) <hicpp-braces-around-statements>
|
||||
hicpp-deprecated-headers (redirects to modernize-deprecated-headers) <hicpp-deprecated-headers>
|
||||
hicpp-exception-baseclass
|
||||
hicpp-explicit-conversions (redirects to google-explicit-constructor) <hicpp-explicit-conversions>
|
||||
hicpp-function-size (redirects to readability-function-size) <hicpp-function-size>
|
||||
hicpp-invalid-access-moved (redirects to misc-use-after-move) <hicpp-invalid-access-moved>
|
||||
hicpp-move-const-arg (redirects to misc-move-const-arg) <hicpp-move-const-arg>
|
||||
hicpp-member-init (redirects to cppcoreguidelines-pro-type-member-init) <hicpp-member-init>
|
||||
hicpp-named-parameter (redirects to readability-named-parameter) <hicpp-named-parameter>
|
||||
hicpp-new-delete-operators (redirects to misc-new-delete-overloads) <hicpp-new-delete-operators>
|
||||
hicpp-no-array-decay (redirects to cppcoreguidelines-pro-bounds-array-to-pointer-decay) <hicpp-no-array-decay>
|
||||
hicpp-no-assembler
|
||||
hicpp-no-malloc (redirects to cppcoreguidelines-no-malloc) <hicpp-no-malloc>
|
||||
hicpp-noexcept-move (redirects to misc-noexcept-moveconstructor) <hicpp-noexcept-move>
|
||||
hicpp-signed-bitwise
|
||||
hicpp-special-member-functions (redirects to cppcoreguidelines-special-member-functions) <hicpp-special-member-functions>
|
||||
hicpp-static-assert (redirects to misc-static-assert) <hicpp-static-assert>
|
||||
hicpp-undelegated-constructor (redirects to misc-undelegated-constructor) <hicpp-undelegated-constructor>
|
||||
hicpp-use-auto (redirects to modernize-use-auto) <hicpp-use-auto>
|
||||
hicpp-use-emplace (redirects to modernize-use-emplace) <hicpp-use-emplace>
|
||||
hicpp-use-equals-default (redirects to modernize-use-equals-default) <hicpp-use-equals-default>
|
||||
hicpp-use-equals-delete (redirects to modernize-use-equals-delete) <hicpp-use-equals-delete>
|
||||
hicpp-use-noexcept (redirects to modernize-use-noexcept) <hicpp-use-noexcept>
|
||||
hicpp-use-nullptr (redirects to modernize-use-nullptr) <hicpp-use-nullptr>
|
||||
hicpp-use-override (redirects to modernize-use-override) <hicpp-use-override>
|
||||
hicpp-vararg (redirects to cppcoreguidelines-pro-type-varg) <hicpp-vararg>
|
||||
llvm-header-guard
|
||||
llvm-include-order
|
||||
llvm-namespace-comment
|
||||
|
|
Loading…
Reference in New Issue