aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-07-11[clang-tidy][NFC] add '.clang-tidy' config for clang-tidy project (#147793)Baranov Victor1-1/+1
Added `.clang-tidy` config as discussed in [RFC](https://discourse.llvm.org/t/rfc-create-hardened-clang-tidy-config-for-clang-tidy-directory/87247). Added `bugprone`, `readability`, `modernize`, `performance` checks that didn't create many warnings. Fixed minor warnings to make `/clang-tidy` directory complaint with `clang-tidy-20`. Disabled checks will be enabled in future PRs after fixing their warnings.
2025-06-10[clang-tidy][NFC] fix 'misc-use-internal-linkage' check warnings (#143482)Baranov Victor1-0/+4
Run misc-use-internal-linkage check over clang-tidy code. Also fixed a couple of other clang-tidy warnings. Apart from issues in header files, all '.cpp' in `clang-tools-extra/clang-tidy` must be clang-tidy clear now.
2025-06-08[clang-tidy] Fix false positives with deducing this in ↵flovent1-1/+2
`readability-convert-member-functions-to-static` check (#141391) Add check for `DeclRefExpr` which points to an explicit object parameter. Fixes #141381. --------- Co-authored-by: fubowen <fubowen@protomail.com> Co-authored-by: flovent <flbven@protomail.com>
2024-03-31Revert "[clang-tidy][NFC] Remove duplicated code"Piotr Zegar1-15/+37
This reverts commit b6f6be4b500ff64c23a5103ac3311cb74519542f.
2024-03-31[clang-tidy][NFC] Remove duplicated codePiotr Zegar1-37/+15
Remove duplicated matchers by moving some of them to utils/Matchers.h. Add some anonymous namespaces and renamed some code to avoid ODR issues.
2023-06-24[clang-tidy] Fix false negative in ↵Nathan James1-0/+5
readability-convert-member-functions-to-static A nested class in a member function can erroneously confuse the check into thinking that any CXXThisExpr found relate to the outer class, preventing any warnings. Fix this by not traversing any nested classes. Fixes https://github.com/llvm/llvm-project/issues/56765 Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D130665
2023-01-14[clang-tidy][NFC] Use C++17 nested namespaces in the clang-tidy folderCarlos Galvez1-6/+2
Fix applied by running: run-clang-tidy.py -checks=-*,modernize-concat-nested-namespaces Differential Revision: https://reviews.llvm.org/D141770
2021-08-11[llvm][clang][NFC] updates inline licence infoChristopher Di Bella1-4/+3
Some files still contained the old University of Illinois Open Source Licence header. This patch replaces that with the Apache 2 with LLVM Exception licence. Differential Revision: https://reviews.llvm.org/D107528
2020-06-29[clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header filesNathan James1-0/+1
Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D82661
2019-08-22Remove \brief commands from doxygen comments.Dmitri Gribenko1-1/+1
Summary: We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done [This is analogous to LLVM r331272 and CFE r331834] Subscribers: srhines, nemanjai, javed.absar, kbarton, MaskRay, jkorous, arphaman, jfb, kadircet, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66578 llvm-svn: 369643
2019-07-16[clang-tidy] initial version of readability-convert-member-functions-to-staticMatthias Gehre1-0/+172
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