File indexing completed on 2026-05-10 08:36:20
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_PARAMETERS_H
0010 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_PARAMETERS_H
0011
0012 #include "../ClangTidyCheck.h"
0013
0014 namespace clang::tidy::misc {
0015
0016
0017
0018 class UnusedParametersCheck : public ClangTidyCheck {
0019 public:
0020 UnusedParametersCheck(StringRef Name, ClangTidyContext *Context);
0021 ~UnusedParametersCheck();
0022 void registerMatchers(ast_matchers::MatchFinder *Finder) override;
0023 void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
0024 void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
0025
0026 private:
0027 const bool StrictMode;
0028 const bool IgnoreVirtual;
0029 class IndexerVisitor;
0030 std::unique_ptr<IndexerVisitor> Indexer;
0031
0032 void
0033 warnOnUnusedParameter(const ast_matchers::MatchFinder::MatchResult &Result,
0034 const FunctionDecl *Function, unsigned ParamIndex);
0035 };
0036
0037 }
0038
0039 #endif