Lines Matching refs:CE
48 void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
50 void CheckOpen(CheckerContext &C, const CallExpr *CE) const;
51 void CheckOpenAt(CheckerContext &C, const CallExpr *CE) const;
52 void CheckPthreadOnce(CheckerContext &C, const CallExpr *CE) const;
55 const CallExpr *CE, OpenVariant Variant) const;
66 void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
71 void CheckCallocZero(CheckerContext &C, const CallExpr *CE) const;
72 void CheckMallocZero(CheckerContext &C, const CallExpr *CE) const;
73 void CheckReallocZero(CheckerContext &C, const CallExpr *CE) const;
74 void CheckReallocfZero(CheckerContext &C, const CallExpr *CE) const;
75 void CheckAllocaZero(CheckerContext &C, const CallExpr *CE) const;
76 void CheckAllocaWithAlignZero(CheckerContext &C, const CallExpr *CE) const;
77 void CheckVallocZero(CheckerContext &C, const CallExpr *CE) const;
84 const CallExpr *CE,
104 void UnixAPIMisuseChecker::checkPreStmt(const CallExpr *CE, in checkPreStmt() argument
106 const FunctionDecl *FD = C.getCalleeDecl(CE); in checkPreStmt()
121 CheckOpen(C, CE); in checkPreStmt()
124 CheckOpenAt(C, CE); in checkPreStmt()
127 CheckPthreadOnce(C, CE); in checkPreStmt()
145 const CallExpr *CE) const { in CheckOpen()
146 CheckOpenVariant(C, CE, OpenVariant::Open); in CheckOpen()
150 const CallExpr *CE) const { in CheckOpenAt()
151 CheckOpenVariant(C, CE, OpenVariant::OpenAt); in CheckOpenAt()
155 const CallExpr *CE, in CheckOpenVariant() argument
184 if (CE->getNumArgs() < MinArgCount) { in CheckOpenVariant()
188 } else if (CE->getNumArgs() == MaxArgCount) { in CheckOpenVariant()
189 const Expr *Arg = CE->getArg(CreateModeArgIndex); in CheckOpenVariant()
203 } else if (CE->getNumArgs() > MaxArgCount) { in CheckOpenVariant()
211 CE->getArg(MaxArgCount)->getSourceRange()); in CheckOpenVariant()
231 const Expr *oflagsEx = CE->getArg(FlagsArgIndex); in CheckOpenVariant()
257 if (CE->getNumArgs() < MaxArgCount) { in CheckOpenVariant()
275 const CallExpr *CE) const { in CheckPthreadOnce()
280 if (CE->getNumArgs() < 1) in CheckPthreadOnce()
286 const MemRegion *R = C.getSVal(CE->getArg(0)).getAsRegion(); in CheckPthreadOnce()
310 report->addRange(CE->getArg(0)->getSourceRange()); in CheckPthreadOnce()
365 const CallExpr *CE, in BasicAllocationCheck() argument
370 if (CE->getNumArgs() != numArgs) in BasicAllocationCheck()
376 const Expr *arg = CE->getArg(sizeArg); in BasicAllocationCheck()
394 const CallExpr *CE) const { in CheckCallocZero()
395 unsigned int nArgs = CE->getNumArgs(); in CheckCallocZero()
404 const Expr *arg = CE->getArg(i); in CheckCallocZero()
430 const CallExpr *CE) const { in CheckMallocZero()
431 BasicAllocationCheck(C, CE, 1, 0, "malloc"); in CheckMallocZero()
435 const CallExpr *CE) const { in CheckReallocZero()
436 BasicAllocationCheck(C, CE, 2, 1, "realloc"); in CheckReallocZero()
440 const CallExpr *CE) const { in CheckReallocfZero()
441 BasicAllocationCheck(C, CE, 2, 1, "reallocf"); in CheckReallocfZero()
445 const CallExpr *CE) const { in CheckAllocaZero()
446 BasicAllocationCheck(C, CE, 1, 0, "alloca"); in CheckAllocaZero()
451 const CallExpr *CE) const { in CheckAllocaWithAlignZero()
452 BasicAllocationCheck(C, CE, 2, 0, "__builtin_alloca_with_align"); in CheckAllocaWithAlignZero()
456 const CallExpr *CE) const { in CheckVallocZero()
457 BasicAllocationCheck(C, CE, 1, 0, "valloc"); in CheckVallocZero()
460 void UnixAPIPortabilityChecker::checkPreStmt(const CallExpr *CE, in checkPreStmt() argument
462 const FunctionDecl *FD = C.getCalleeDecl(CE); in checkPreStmt()
477 CheckCallocZero(C, CE); in checkPreStmt()
480 CheckMallocZero(C, CE); in checkPreStmt()
483 CheckReallocZero(C, CE); in checkPreStmt()
486 CheckReallocfZero(C, CE); in checkPreStmt()
489 CheckAllocaZero(C, CE); in checkPreStmt()
492 CheckAllocaWithAlignZero(C, CE); in checkPreStmt()
495 CheckVallocZero(C, CE); in checkPreStmt()