llvm-project/clang-tools-extra/clang-tidy
Matthias Gehre ffca322266 [clang-tidy] initial version of readability-convert-member-functions-to-static
Summary:
Finds non-static member functions that can be made ``static``.

I have run this check (repeatedly) over llvm-project. It made 1708 member functions
``static``. Out of those, I had to exclude 22 via ``NOLINT`` because their address
was taken and stored in a variable of pointer-to-member type (e.g. passed to
llvm::StringSwitch).
It also made 243 member functions ``const``. (This is currently very conservative
to have no false-positives and can hopefully be extended in the future.)

You can find the results here: https://github.com/mgehre/llvm-project/commits/static_const_eval

Reviewers: alexfh, aaron.ballman

Subscribers: mgorny, xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61749

llvm-svn: 366265
2019-07-16 21:19:00 +00:00
..
abseil Enhance abseil-faster-strsplit-delimiter to handle other non-printable characters. 2019-07-09 11:04:04 +00:00
android android: add a close-on-exec check on pipe() 2019-06-06 05:21:45 +00:00
boost [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
bugprone Simplify with llvm::is_contained. NFC 2019-07-13 07:23:12 +00:00
cert [clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment 2019-05-23 20:29:04 +00:00
cppcoreguidelines [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init 2019-05-24 05:46:57 +00:00
fuchsia [clang-tidy] Split fuchsia-default-arguments 2019-06-18 18:07:33 +00:00
google Fixed google-readability-casting test to work in c++17 2019-06-11 10:59:22 +00:00
hicpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check' 2019-05-10 18:27:09 +00:00
misc [clang-tidy] misc-unused-parameters: don't comment out parameter name for C code 2019-06-21 21:30:25 +00:00
modernize Simplify with llvm::is_contained. NFC 2019-07-13 07:23:12 +00:00
mpi [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
objc [clang-tidy] Add a check for [super self] in initializers 🔍 2019-04-17 22:29:06 +00:00
openmp [clang-tidy] openmp-exception-escape check: point to the structured-block 2019-05-05 21:26:32 +00:00
performance [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
plugin [clang-tidy] Make the plugin honor NOLINT 2019-06-06 13:13:27 +00:00
portability [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
readability [clang-tidy] initial version of readability-convert-member-functions-to-static 2019-07-16 21:19:00 +00:00
tool Fixed two issues in clang-tidy -help. 2019-07-01 18:55:10 +00:00
utils [clang-tidy] Extend TransformerClangTidyCheck to support adding includes. 2019-07-02 13:25:07 +00:00
zircon [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
CMakeLists.txt [clang-tidy] Separate the check-facing interface 2019-03-25 12:36:30 +00:00
ClangTidy.cpp [clang-tidy] Address post-commit comments 2019-04-18 14:18:14 +00:00
ClangTidy.h [clang-tidy] Separate the check-facing interface 2019-03-25 12:36:30 +00:00
ClangTidyCheck.cpp [clang-tidy] Separate the check-facing interface 2019-03-25 12:36:30 +00:00
ClangTidyCheck.h [clang-tidy] Make ClangTidyCheck::OptionsView public. 2019-06-13 19:05:02 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Make the plugin honor NOLINT 2019-06-06 13:13:27 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Make the plugin honor NOLINT 2019-06-06 13:13:27 +00:00
ClangTidyForceLinker.h [clang-tidy] A new OpenMP module 2019-03-22 19:46:01 +00:00
ClangTidyModule.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyModule.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyModuleRegistry.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyOptions.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyProfiling.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyProfiling.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExpandModularHeadersPPCallbacks.cpp [clang-tidy] Fix a compiler warning. 2019-03-22 15:07:18 +00:00
ExpandModularHeadersPPCallbacks.h [clang-tidy] Fix a compiler warning. 2019-03-22 15:07:18 +00:00
add_new_check.py [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check' 2019-05-10 18:27:09 +00:00
rename_check.py [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check' 2019-05-10 18:27:09 +00:00