xref: /llvm-project/clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h (revision 4718da506091a37ca4863d979bc541e359b79b10)
1ffca3222SMatthias Gehre //===--- ConvertMemberFunctionsToStatic.h - clang-tidy ----------*- C++ -*-===//
2ffca3222SMatthias Gehre //
3c874dd53SChristopher Di Bella // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4c874dd53SChristopher Di Bella // See https://llvm.org/LICENSE.txt for license information.
5c874dd53SChristopher Di Bella // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6ffca3222SMatthias Gehre //
7ffca3222SMatthias Gehre //===----------------------------------------------------------------------===//
8ffca3222SMatthias Gehre 
9ffca3222SMatthias Gehre #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
10ffca3222SMatthias Gehre #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
11ffca3222SMatthias Gehre 
12860aefd0SNathan James #include "../ClangTidyCheck.h"
13ffca3222SMatthias Gehre 
14*4718da50SCarlos Galvez namespace clang::tidy::readability {
15ffca3222SMatthias Gehre 
16ffca3222SMatthias Gehre /// This check finds C++ class methods than can be made static
17ffca3222SMatthias Gehre /// because they don't use the 'this' pointer.
18ffca3222SMatthias Gehre ///
19ffca3222SMatthias Gehre /// For the user-facing documentation see:
20ffca3222SMatthias Gehre /// http://clang.llvm.org/extra/clang-tidy/checks/
21ffca3222SMatthias Gehre /// readability-convert-member-functions-to-static.html
22ffca3222SMatthias Gehre class ConvertMemberFunctionsToStatic : public ClangTidyCheck {
23ffca3222SMatthias Gehre public:
ConvertMemberFunctionsToStatic(StringRef Name,ClangTidyContext * Context)24ffca3222SMatthias Gehre   ConvertMemberFunctionsToStatic(StringRef Name, ClangTidyContext *Context)
25ffca3222SMatthias Gehre       : ClangTidyCheck(Name, Context) {}
26ffca3222SMatthias Gehre   void registerMatchers(ast_matchers::MatchFinder *Finder) override;
27ffca3222SMatthias Gehre   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
28ffca3222SMatthias Gehre };
29ffca3222SMatthias Gehre 
30*4718da50SCarlos Galvez } // namespace clang::tidy::readability
31ffca3222SMatthias Gehre 
32ffca3222SMatthias Gehre #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
33