forked from OSchip/llvm-project
[clang-tidy] readability-named-parameter: don't complain about implicit parameters
Fixes http://llvm.org/PR24464. llvm-svn: 252248
This commit is contained in:
parent
34ca831d9f
commit
272397b42e
|
@ -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;
|
||||
|
|
|
@ -127,3 +127,7 @@ typedef decltype(nullptr) nullptr_t;
|
|||
}
|
||||
|
||||
void f(std::nullptr_t) {}
|
||||
|
||||
typedef void (F)(int);
|
||||
F f;
|
||||
void f(int x) {}
|
||||
|
|
Loading…
Reference in New Issue