diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx index 2a1fc1ff8a2d..f170552ba6de 100644 --- a/compilerplugins/clang/constparams.cxx +++ b/compilerplugins/clang/constparams.cxx @@ -194,7 +194,8 @@ bool ConstParams::VisitFunctionDecl(const FunctionDecl * functionDecl) // calculate the ones we want to check for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) { // ignore unused params - if (pParmVarDecl->getName().empty()) + if (pParmVarDecl->getName().empty() + || pParmVarDecl->hasAttr()) continue; auto const type = loplugin::TypeCheck(pParmVarDecl->getType()); if (!type.Pointer() && !type.LvalueReference())