Lines Matching refs:MK
77 static bool misuseCausesCrash(MisuseKind MK) { in misuseCausesCrash() argument
78 return MK == MK_Dereference; in misuseCausesCrash()
137 bool shouldWarnAbout(ObjectKind OK, MisuseKind MK) const { in shouldWarnAbout()
143 OK.StdKind != SK_SmartPtr || MK == MK_Dereference); in shouldWarnAbout()
153 const CXXRecordDecl *RD, MisuseKind MK) const;
160 const CXXRecordDecl *RD, MisuseKind MK) in MovedBugVisitor() argument
161 : Chk(Chk), Region(R), RD(RD), MK(MK), Found(false) {} in MovedBugVisitor()
184 const MisuseKind MK; member in __anondfc54e510211::MoveChecker::MovedBugVisitor
212 const CXXRecordDecl *RD, MisuseKind MK,
218 CheckerContext &C, MisuseKind MK) const;
304 if (MK == MK_Dereference) { in VisitNode()
306 Chk.explainObject(OS, Region, RD, MK); in VisitNode()
317 Chk.explainObject(OS, Region, RD, MK); in VisitNode()
322 Chk.explainObject(OS, Region, RD, MK); in VisitNode()
351 const CXXRecordDecl *RD, MisuseKind MK, in modelUse() argument
359 if (MK == MK_Dereference && OK.StdKind != SK_SmartPtr) in modelUse()
360 MK = MK_FunCall; in modelUse()
362 if (!RS || !shouldWarnAbout(OK, MK) in modelUse()
373 if (misuseCausesCrash(MK)) { in modelUse()
381 ExplodedNode *N = reportBug(Region, RD, C, MK); in modelUse()
393 MisuseKind MK) const { in reportBug()
394 if (ExplodedNode *N = misuseCausesCrash(MK) ? C.generateErrorNode() in reportBug()
412 switch(MK) { in reportBug()
415 explainObject(OS, Region, RD, MK); in reportBug()
419 explainObject(OS, Region, RD, MK); in reportBug()
424 explainObject(OS, Region, RD, MK); in reportBug()
429 explainObject(OS, Region, RD, MK); in reportBug()
436 R->addVisitor(std::make_unique<MovedBugVisitor>(*this, Region, RD, MK)); in reportBug()
577 const CXXRecordDecl *RD, MisuseKind MK) const { in explainObject()
592 if (MK != MK_Dereference) in explainObject()
617 MisuseKind MK = CtorDec->isMoveConstructor() ? MK_Move : MK_Copy; in checkPreCall() local
618 modelUse(State, ArgRegion, RD, MK, C); in checkPreCall()
667 MisuseKind MK = in checkPreCall() local
669 modelUse(State, ArgRegion, RD, MK, C); in checkPreCall()