clang-tools 22.0.0git
clang::tidy::modernize::RedundantVoidArgCheck Class Reference

Find and remove redundant void argument lists. More...

#include <RedundantVoidArgCheck.h>

Inheritance diagram for clang::tidy::modernize::RedundantVoidArgCheck:
[legend]

Public Member Functions

 RedundantVoidArgCheck (StringRef Name, ClangTidyContext *Context)
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Find and remove redundant void argument lists.

Examples: int f(void); becomes int f(); int (*f(void))(void); becomes int (*f())(); typedef int (*f_t(void))(void); becomes typedef int (*f_t())(); void (C::*p)(void); becomes void (C::*p)(); C::C(void) {} becomes C::C() {} C::~C(void) {} becomes C::~C() {}

Definition at line 29 of file RedundantVoidArgCheck.h.

Constructor & Destructor Documentation

◆ RedundantVoidArgCheck()

clang::tidy::modernize::RedundantVoidArgCheck::RedundantVoidArgCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 31 of file RedundantVoidArgCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::modernize::RedundantVoidArgCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 69 of file RedundantVoidArgCheck.cpp.

References clang::tidy::modernize::TypedefName.

◆ isLanguageVersionSupported()

bool clang::tidy::modernize::RedundantVoidArgCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 34 of file RedundantVoidArgCheck.h.

◆ registerMatchers()

void clang::tidy::modernize::RedundantVoidArgCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 41 of file RedundantVoidArgCheck.cpp.


The documentation for this class was generated from the following files: