xref: /llvm-project/clang-tools-extra/docs/clang-tidy/checks/modernize/redundant-void-arg.rst (revision 6e566bc5523f743bc34a7e26f050f1f2b4d699a8)
1.. title:: clang-tidy - modernize-redundant-void-arg
2
3modernize-redundant-void-arg
4============================
5
6Find and remove redundant ``void`` argument lists.
7
8Examples:
9  ===================================  ===========================
10  Initial code                         Code with applied fixes
11  ===================================  ===========================
12  ``int f(void);``                     ``int f();``
13  ``int (*f(void))(void);``            ``int (*f())();``
14  ``typedef int (*f_t(void))(void);``  ``typedef int (*f_t())();``
15  ``void (C::*p)(void);``              ``void (C::*p)();``
16  ``C::C(void) {}``                    ``C::C() {}``
17  ``C::~C(void) {}``                   ``C::~C() {}``
18  ===================================  ===========================
19