[PATCH] D46951: [clang-tidy] misc-unused-parameters - retain old behavior under StrictMode
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 28 08:17:20 PDT 2018
alexfh added inline comments.
================
Comment at: clang-tidy/misc/UnusedParametersCheck.cpp:180
+ // (constructor initializer counts for non-empty body).
+ if (StrictMode || llvm::distance(Function->getBody()->children()) > 0 ||
+ (isa<CXXConstructorDecl>(Function) &&
----------------
lebedev.ri wrote:
> So this checks that there are children.
Yes, and llvm::distance (recently renamed to llvm::size) doesn't work here any more, so the code now checks for iterator equality, which should be easier to read.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46951
More information about the cfe-commits
mailing list