Implement hicpp-braces-around-statements as an alias to readability-braces-around-statements.

Patch by Jonas Toth.

llvm-svn: 310707
This commit is contained in:
Aaron Ballman 2017-08-11 12:12:36 +00:00
parent 213d34330f
commit 6c2920a30a
4 changed files with 17 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "../modernize/UseEqualsDefaultCheck.h" #include "../modernize/UseEqualsDefaultCheck.h"
#include "../modernize/UseEqualsDeleteCheck.h" #include "../modernize/UseEqualsDeleteCheck.h"
#include "../modernize/UseOverrideCheck.h" #include "../modernize/UseOverrideCheck.h"
#include "../readability/BracesAroundStatementsCheck.h"
#include "../readability/FunctionSizeCheck.h" #include "../readability/FunctionSizeCheck.h"
#include "../readability/IdentifierNamingCheck.h" #include "../readability/IdentifierNamingCheck.h"
#include "NoAssemblerCheck.h" #include "NoAssemblerCheck.h"
@ -32,6 +33,8 @@ namespace hicpp {
class HICPPModule : public ClangTidyModule { class HICPPModule : public ClangTidyModule {
public: public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<readability::BracesAroundStatementsCheck>(
"hicpp-braces-around-statements");
CheckFactories.registerCheck<google::ExplicitConstructorCheck>( CheckFactories.registerCheck<google::ExplicitConstructorCheck>(
"hicpp-explicit-conversions"); "hicpp-explicit-conversions");
CheckFactories.registerCheck<readability::FunctionSizeCheck>( CheckFactories.registerCheck<readability::FunctionSizeCheck>(

View File

@ -92,6 +92,8 @@ Improvements to clang-tidy
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html#cmdoption-arg-IgnoreImplicitConstructors>`_ <http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html#cmdoption-arg-IgnoreImplicitConstructors>`_
option. option.
- Added alias `hicpp-braces-around-statements <http://clang.llvm.org/extra/clang-tidy/checks/hicpp-braces-around-statements.html>`_
Improvements to include-fixer Improvements to include-fixer
----------------------------- -----------------------------

View File

@ -0,0 +1,11 @@
.. title:: clang-tidy - hicpp-braces-around-statements
.. meta::
:http-equiv=refresh: 5;URL=readability-braces-around-statements.html
hicpp-braces-around-statements
==============================
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/>`_.

View File

@ -62,6 +62,7 @@ Clang-Tidy Checks
google-runtime-member-string-references google-runtime-member-string-references
google-runtime-operator google-runtime-operator
google-runtime-references google-runtime-references
hicpp-braces-around-statements (redirects to readability-braces-around-statements) <hicpp-braces-around-statements>
hicpp-explicit-conversions (redirects to google-explicit-constructor) <hicpp-explicit-conversions> hicpp-explicit-conversions (redirects to google-explicit-constructor) <hicpp-explicit-conversions>
hicpp-function-size (redirects to readability-function-size) <hicpp-function-size> 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-invalid-access-moved (redirects to misc-use-after-move) <hicpp-invalid-access-moved>