summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/constparams.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx
index 50e1c98bfc3c..024c4d8e3430 100644
--- a/compilerplugins/clang/constparams.cxx
+++ b/compilerplugins/clang/constparams.cxx
@@ -188,6 +188,7 @@ bool ConstParams::VisitFunctionDecl(const FunctionDecl * functionDecl)
|| name == "egiGraphicExport"
|| name == "etiGraphicExport"
|| name == "epsGraphicExport"
+ || name == "releasePool" // vcl/osx/saldata.cxx
)
return true;
}
@@ -422,13 +423,7 @@ bool ConstParams::checkIfCanBeConst(const Stmt* stmt, const ParmVarDecl* parmVar
return false;
} else if (isa<CastExpr>(parent)) { // all other cast expression subtypes
if (auto e = dyn_cast<ExplicitCastExpr>(parent)) {
- auto t = e->getTypeAsWritten();
- if (t->isAnyPointerType()
- && !t->getPointeeType().isConstQualified())
- {
- return false;
- }
- if (loplugin::TypeCheck(t).Void()) {
+ if (loplugin::TypeCheck(e->getTypeAsWritten()).Void()) {
if (auto const sub = dyn_cast<DeclRefExpr>(
e->getSubExpr()->IgnoreParenImpCasts()))
{