9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REDUNDANT_VOID_ARG_CHECK_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REDUNDANT_VOID_ARG_CHECK_H
12#include "../ClangTidyCheck.h"
13#include "clang/Lex/Token.h"
35 return LangOpts.CPlusPlus;
40 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
43 void processFunctionDecl(
const ast_matchers::MatchFinder::MatchResult &Result,
44 const FunctionDecl *Function);
47 processTypedefNameDecl(
const ast_matchers::MatchFinder::MatchResult &Result,
48 const TypedefNameDecl *Typedef);
50 void processFieldDecl(
const ast_matchers::MatchFinder::MatchResult &Result,
51 const FieldDecl *Member);
53 void processVarDecl(
const ast_matchers::MatchFinder::MatchResult &Result,
57 processNamedCastExpr(
const ast_matchers::MatchFinder::MatchResult &Result,
58 const CXXNamedCastExpr *NamedCast);
61 processExplicitCastExpr(
const ast_matchers::MatchFinder::MatchResult &Result,
62 const ExplicitCastExpr *ExplicitCast);
64 void processLambdaExpr(
const ast_matchers::MatchFinder::MatchResult &Result,
65 const LambdaExpr *Lambda);
68 removeVoidArgumentTokens(
const ast_matchers::MatchFinder::MatchResult &Result,
69 SourceRange
Range, StringRef GrammarLocation);
71 void removeVoidToken(Token VoidToken, StringRef
Diagnostic);
llvm::SmallString< 256U > Name
DiagnosticCallback Diagnostic
CharSourceRange Range
SourceRange for the file name.
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Find and remove redundant void argument lists.
RedundantVoidArgCheck(StringRef Name, ClangTidyContext *Context)
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override
Override this to disable registering matchers and PP callbacks if an invalid language version is bein...
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.