#include "RedundantVoidArgCheck.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Lexer.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::modernize {
namespace {
bool protoTypeHasNoParms(QualType QT) { … }
const char FunctionId[] = …;
const char TypedefId[] = …;
const char FieldId[] = …;
const char VarId[] = …;
const char NamedCastId[] = …;
const char CStyleCastId[] = …;
const char ExplicitCastId[] = …;
const char LambdaId[] = …;
}
void RedundantVoidArgCheck::registerMatchers(MatchFinder *Finder) { … }
void RedundantVoidArgCheck::check(const MatchFinder::MatchResult &Result) { … }
void RedundantVoidArgCheck::processFunctionDecl(
const MatchFinder::MatchResult &Result, const FunctionDecl *Function) { … }
bool isMacroIdentifier(const IdentifierTable &Idents, const Token &ProtoToken) { … }
void RedundantVoidArgCheck::removeVoidArgumentTokens(
const ast_matchers::MatchFinder::MatchResult &Result, SourceRange Range,
StringRef GrammarLocation) { … }
void RedundantVoidArgCheck::removeVoidToken(Token VoidToken,
StringRef Diagnostic) { … }
void RedundantVoidArgCheck::processTypedefNameDecl(
const MatchFinder::MatchResult &Result,
const TypedefNameDecl *TypedefName) { … }
void RedundantVoidArgCheck::processFieldDecl(
const MatchFinder::MatchResult &Result, const FieldDecl *Member) { … }
void RedundantVoidArgCheck::processVarDecl(
const MatchFinder::MatchResult &Result, const VarDecl *Var) { … }
void RedundantVoidArgCheck::processNamedCastExpr(
const MatchFinder::MatchResult &Result, const CXXNamedCastExpr *NamedCast) { … }
void RedundantVoidArgCheck::processExplicitCastExpr(
const MatchFinder::MatchResult &Result,
const ExplicitCastExpr *ExplicitCast) { … }
void RedundantVoidArgCheck::processLambdaExpr(
const MatchFinder::MatchResult &Result, const LambdaExpr *Lambda) { … }
}