[PATCH] Add readability-remove-void-arg check to clang-tidy
Richard
legalize at xmission.com
Fri Feb 13 21:57:19 PST 2015
Hi alexfh,
This check for clang-tidy looks for function with zero arguments declared as (void) and removes the unnecessary void token.
int foo(void);
becomes
int foo();
The check performs no formatting of the surrounding context but uses the lexer to look for the token sequence "(", "void", ")" in the prototype text. If this sequence of tokens is found, a removal is issued for the void token only.
http://reviews.llvm.org/D7639
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/RemoveVoidArg.cpp
clang-tidy/readability/RemoveVoidArg.h
test/clang-tidy/readability-remove-void-arg.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7639.19961.patch
Type: text/x-patch
Size: 30571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150214/b46e52cd/attachment.bin>
More information about the cfe-commits
mailing list