Lines Matching refs:CE
46 void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
48 void CheckOpen(CheckerContext &C, const CallExpr *CE) const;
49 void CheckOpenAt(CheckerContext &C, const CallExpr *CE) const;
50 void CheckPthreadOnce(CheckerContext &C, const CallExpr *CE) const;
53 const CallExpr *CE, OpenVariant Variant) const;
64 void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
69 void CheckCallocZero(CheckerContext &C, const CallExpr *CE) const;
70 void CheckMallocZero(CheckerContext &C, const CallExpr *CE) const;
71 void CheckReallocZero(CheckerContext &C, const CallExpr *CE) const;
72 void CheckReallocfZero(CheckerContext &C, const CallExpr *CE) const;
73 void CheckAllocaZero(CheckerContext &C, const CallExpr *CE) const;
74 void CheckAllocaWithAlignZero(CheckerContext &C, const CallExpr *CE) const;
75 void CheckVallocZero(CheckerContext &C, const CallExpr *CE) const;
82 const CallExpr *CE,
102 void UnixAPIMisuseChecker::checkPreStmt(const CallExpr *CE, in checkPreStmt() argument
104 const FunctionDecl *FD = C.getCalleeDecl(CE); in checkPreStmt()
119 CheckOpen(C, CE); in checkPreStmt()
122 CheckOpenAt(C, CE); in checkPreStmt()
125 CheckPthreadOnce(C, CE); in checkPreStmt()
143 const CallExpr *CE) const { in CheckOpen()
144 CheckOpenVariant(C, CE, OpenVariant::Open); in CheckOpen()
148 const CallExpr *CE) const { in CheckOpenAt()
149 CheckOpenVariant(C, CE, OpenVariant::OpenAt); in CheckOpenAt()
153 const CallExpr *CE, in CheckOpenVariant() argument
182 if (CE->getNumArgs() < MinArgCount) { in CheckOpenVariant()
185 } else if (CE->getNumArgs() == MaxArgCount) { in CheckOpenVariant()
186 const Expr *Arg = CE->getArg(CreateModeArgIndex); in CheckOpenVariant()
200 } else if (CE->getNumArgs() > MaxArgCount) { in CheckOpenVariant()
208 CE->getArg(MaxArgCount)->getSourceRange()); in CheckOpenVariant()
228 const Expr *oflagsEx = CE->getArg(FlagsArgIndex); in CheckOpenVariant()
255 if (CE->getNumArgs() < MaxArgCount) { in CheckOpenVariant()
273 const CallExpr *CE) const { in CheckPthreadOnce()
278 if (CE->getNumArgs() < 1) in CheckPthreadOnce()
284 const MemRegion *R = C.getSVal(CE->getArg(0)).getAsRegion(); in CheckPthreadOnce()
308 report->addRange(CE->getArg(0)->getSourceRange()); in CheckPthreadOnce()
363 const CallExpr *CE, in BasicAllocationCheck() argument
368 if (CE->getNumArgs() != numArgs) in BasicAllocationCheck()
374 const Expr *arg = CE->getArg(sizeArg); in BasicAllocationCheck()
392 const CallExpr *CE) const { in CheckCallocZero()
393 unsigned int nArgs = CE->getNumArgs(); in CheckCallocZero()
402 const Expr *arg = CE->getArg(i); in CheckCallocZero()
428 const CallExpr *CE) const { in CheckMallocZero()
429 BasicAllocationCheck(C, CE, 1, 0, "malloc"); in CheckMallocZero()
433 const CallExpr *CE) const { in CheckReallocZero()
434 BasicAllocationCheck(C, CE, 2, 1, "realloc"); in CheckReallocZero()
438 const CallExpr *CE) const { in CheckReallocfZero()
439 BasicAllocationCheck(C, CE, 2, 1, "reallocf"); in CheckReallocfZero()
443 const CallExpr *CE) const { in CheckAllocaZero()
444 BasicAllocationCheck(C, CE, 1, 0, "alloca"); in CheckAllocaZero()
449 const CallExpr *CE) const { in CheckAllocaWithAlignZero()
450 BasicAllocationCheck(C, CE, 2, 0, "__builtin_alloca_with_align"); in CheckAllocaWithAlignZero()
454 const CallExpr *CE) const { in CheckVallocZero()
455 BasicAllocationCheck(C, CE, 1, 0, "valloc"); in CheckVallocZero()
458 void UnixAPIPortabilityChecker::checkPreStmt(const CallExpr *CE, in checkPreStmt() argument
460 const FunctionDecl *FD = C.getCalleeDecl(CE); in checkPreStmt()
475 CheckCallocZero(C, CE); in checkPreStmt()
478 CheckMallocZero(C, CE); in checkPreStmt()
481 CheckReallocZero(C, CE); in checkPreStmt()
484 CheckReallocfZero(C, CE); in checkPreStmt()
487 CheckAllocaZero(C, CE); in checkPreStmt()
490 CheckAllocaWithAlignZero(C, CE); in checkPreStmt()
493 CheckVallocZero(C, CE); in checkPreStmt()