From ef064f8aced4ce9594d4cb6b4602f27b535c2d61 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Tue, 22 Dec 2015 18:13:00 +0000 Subject: [PATCH] [clang-tidy] Added documentation for modernize-redundant-void-arg llvm-svn: 256261 --- .../docs/clang-tidy/checks/list.rst | 1 + .../checks/modernize-redundant-void-arg.rst | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 clang-tools-extra/docs/clang-tidy/checks/modernize-redundant-void-arg.rst diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index 60faead09abd..bd60a325f567 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -61,6 +61,7 @@ Clang-Tidy Checks modernize-loop-convert modernize-make-unique modernize-pass-by-value + modernize-redundant-void-arg modernize-replace-auto-ptr modernize-shrink-to-fit modernize-use-auto diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-redundant-void-arg.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-redundant-void-arg.rst new file mode 100644 index 000000000000..d1a03e3fbb61 --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-redundant-void-arg.rst @@ -0,0 +1,18 @@ +.. title:: clang-tidy - modernize-redundant-void-arg + +modernize-redundant-void-arg +============================ + +Find and remove redundant ``void`` argument lists. + +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() {}`` + =================================== ===========================