bool PutPoolItem::VisitCXXMemberCallExpr(const CXXMemberCallExpr* cxxCallExpr)
{ if (ignoreLocation(cxxCallExpr)) returntrue; auto tc = loplugin::TypeCheck(cxxCallExpr->getObjectType()); if (!tc.Class("SfxItemSet")) returntrue; if (!cxxCallExpr->getMethodDecl()->getIdentifier()
|| cxxCallExpr->getMethodDecl()->getName() != "Put") returntrue; auto argExpr = dyn_cast<CXXOperatorCallExpr>(cxxCallExpr->getArg(0)->IgnoreImplicit()); if (!argExpr) returntrue; if (argExpr->getOperator() != OO_Star) returntrue; auto ptrExpr = argExpr->getArg(0)->IgnoreImplicit(); auto tc2 = loplugin::TypeCheck(ptrExpr->getType()); if (!tc2.Class("unique_ptr")) returntrue; // ignore calls when we are passing a copy of a member field if (isa<MemberExpr>(ptrExpr)) returntrue;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.