//===--- RedundantVoidArgCheck.h - clang-tidy --------------------*- C++-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REDUNDANT_VOID_ARG_CHECK_H #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REDUNDANT_VOID_ARG_CHECK_H #include "../ClangTidyCheck.h" #include "clang/Lex/Token.h" #include <string> namespace clang::tidy::modernize { /// 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() {}` /// class RedundantVoidArgCheck : public ClangTidyCheck { … }; } // namespace clang::tidy::modernize #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REDUNDANT_VOID_ARG_CHECK_H