[clang-tidy] readability-named-parameter: don't complain about implicit parameters

Fixes http://llvm.org/PR24464.

llvm-svn: 252248
This commit is contained in:
Alexander Kornienko 2015-11-06 00:19:21 +00:00
parent 34ca831d9f
commit 272397b42e
2 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,8 @@ void NamedParameterCheck::check(const MatchFinder::MatchResult &Result) {
// arguments in the same position.
for (unsigned I = 0, E = Function->getNumParams(); I != E; ++I) {
const ParmVarDecl *Parm = Function->getParamDecl(I);
if (Parm->isImplicit())
continue;
// Look for unnamed parameters.
if (!Parm->getName().empty())
continue;

View File

@ -127,3 +127,7 @@ typedef decltype(nullptr) nullptr_t;
}
void f(std::nullptr_t) {}
typedef void (F)(int);
F f;
void f(int x) {}