[clang-tidy][docs] Fix broken redundant-void-arg documentation. NFC. (#212692)

This commit is contained in:
Zeyi Xu 2026-07-29 15:54:54 +08:00 committed by GitHub
parent f193d19d21
commit b2b5c13f69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,11 +7,12 @@ Finds and removes redundant `void` argument lists.
Works in C++ and in C23 and up.
Examples:
: | Initial code | Code with applied fixes |
| --------------------------------- | ------------------------- |
| `int f(void);` | `int f();` |
| `int (*f(void))(void);` | `int (*f())();` |
| `typedef int (*f_t(void))(void);` | `typedef int (*f_t())();` |
| `void (C::*p)(void);` | `void (C::*p)();` |
| `C::C(void) {}` | `C::C() {}` |
| `C::~C(void) {}` | `C::~C() {}` |
| Initial code | Code with applied fixes |
| --------------------------------- | ------------------------- |
| `int f(void);` | `int f();` |
| `int (*f(void))(void);` | `int (*f())();` |
| `typedef int (*f_t(void))(void);` | `typedef int (*f_t())();` |
| `void (C::*p)(void);` | `void (C::*p)();` |
| `C::C(void) {}` | `C::C() {}` |
| `C::~C(void) {}` | `C::~C() {}` |