aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2018-10-31 19:11:38 +0000
committerAaron Ballman <aaron@aaronballman.com>2018-10-31 19:11:38 +0000
commit3a02722a40677c6ea39b9fe8624f439c417c282c (patch)
treeb284261848eac1ae04a5d324e5619bc3b91f20bb /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
parentc6c627253db6b273dd995771e7af17c53858eaba (diff)
downloadllvm-3a02722a40677c6ea39b9fe8624f439c417c282c.zip
llvm-3a02722a40677c6ea39b9fe8624f439c417c282c.tar.gz
llvm-3a02722a40677c6ea39b9fe8624f439c417c282c.tar.bz2
Implement the readability-const-return-type check.
This check flags function top-level const-qualified return types and suggests removing the mostly-superfluous const qualifier where possible. Patch by Yitzhak Mandelbaum. llvm-svn: 345764
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
index 5855bb0..8dab296 100644
--- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
@@ -12,6 +12,7 @@
#include "../ClangTidyModuleRegistry.h"
#include "AvoidConstParamsInDecls.h"
#include "BracesAroundStatementsCheck.h"
+#include "ConstReturnTypeCheck.h"
#include "ContainerSizeEmptyCheck.h"
#include "DeleteNullPointerCheck.h"
#include "DeletedDefaultCheck.h"
@@ -52,6 +53,8 @@ public:
"readability-avoid-const-params-in-decls");
CheckFactories.registerCheck<BracesAroundStatementsCheck>(
"readability-braces-around-statements");
+ CheckFactories.registerCheck<ConstReturnTypeCheck>(
+ "readability-const-return-type");
CheckFactories.registerCheck<ContainerSizeEmptyCheck>(
"readability-container-size-empty");
CheckFactories.registerCheck<DeleteNullPointerCheck>(