[PATCH] D19117: [clang-tidy] Update RedundantVoidArgCheck to check for type aliases in addition to typedefs
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 14 08:32:56 PDT 2016
aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added reviewers: aaron.ballman, alexfh.
================
Comment at: clang-tidy/modernize/RedundantVoidArgCheck.cpp:109-110
@@ -107,4 +108,4 @@
SourceLocation Start = Function->getLocStart();
- SourceLocation End = Body ? Body->getLocStart().getLocWithOffset(-1) :
- Function->getLocEnd();
+ SourceLocation End =
+ Body ? Body->getLocStart().getLocWithOffset(-1) : Function->getLocEnd();
removeVoidArgumentTokens(Result, SourceRange(Start, End),
----------------
Is this a drive-by formatting fix from clang-format?
================
Comment at: clang-tidy/modernize/RedundantVoidArgCheck.cpp:187
@@ -186,1 +186,3 @@
+ if (protoTypeHasNoParms(TypedefName->getUnderlyingType())) {
+ removeVoidArgumentTokens(Result, TypedefName->getSourceRange(), "typedef");
}
----------------
Use of "typedef" is incorrect here, it should probably be "typedef" or "type alias", depending on the results of an isa<> test.
http://reviews.llvm.org/D19117
More information about the cfe-commits
mailing list