diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx index 31c1bc29affa..2a1fc1ff8a2d 100644 --- a/compilerplugins/clang/constparams.cxx +++ b/compilerplugins/clang/constparams.cxx @@ -187,8 +187,6 @@ bool ConstParams::VisitFunctionDecl(const FunctionDecl * functionDecl) || name == "egiGraphicExport" || name == "etiGraphicExport" || name == "epsGraphicExport" - || name == "QueueCallbackFunction" - // apple_remote/source/HIDRemoteControlDevice.m ) return true; } @@ -419,8 +417,8 @@ bool ConstParams::checkIfCanBeConst(const Stmt* stmt, const ParmVarDecl* parmVar return false; } else if (isa(parent)) { // all other cast expression subtypes if (auto e = dyn_cast(parent)) { - if (loplugin::TypeCheck(e->getTypeAsWritten()).Pointer().NonConst()) - { + loplugin::TypeCheck tc(e->getTypeAsWritten()); + if (tc.Pointer().NonConst() || tc.Void()) { return false; } }