Lines Matching refs:CE
86 void VisitCallExpr(CallExpr *CE);
87 void VisitObjCMessageExpr(ObjCMessageExpr *CE);
95 bool checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD);
102 void checkCall_bcmp(const CallExpr *CE, const FunctionDecl *FD);
103 void checkCall_bcopy(const CallExpr *CE, const FunctionDecl *FD);
104 void checkCall_bzero(const CallExpr *CE, const FunctionDecl *FD);
105 void checkCall_gets(const CallExpr *CE, const FunctionDecl *FD);
106 void checkCall_getpw(const CallExpr *CE, const FunctionDecl *FD);
107 void checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD);
108 void checkCall_mkstemp(const CallExpr *CE, const FunctionDecl *FD);
109 void checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD);
110 void checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD);
111 void checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE,
113 void checkCall_rand(const CallExpr *CE, const FunctionDecl *FD);
114 void checkCall_random(const CallExpr *CE, const FunctionDecl *FD);
115 void checkCall_vfork(const CallExpr *CE, const FunctionDecl *FD);
117 void checkUncheckedReturnValue(CallExpr *CE);
131 void WalkAST::VisitCallExpr(CallExpr *CE) { in VisitCallExpr() argument
133 const FunctionDecl *FD = CE->getDirectCallee(); in VisitCallExpr()
183 (this->*evalFunction)(CE, FD); in VisitCallExpr()
186 VisitChildren(CE); in VisitCallExpr()
206 if (CallExpr *CE = dyn_cast<CallExpr>(Child)) in VisitCompoundStmt() local
207 checkUncheckedReturnValue(CE); in VisitCompoundStmt()
347 void WalkAST::checkCall_bcmp(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_bcmp() argument
375 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_bcmp()
380 CELoc, CE->getCallee()->getSourceRange()); in checkCall_bcmp()
389 void WalkAST::checkCall_bcopy(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_bcopy() argument
417 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_bcopy()
423 CELoc, CE->getCallee()->getSourceRange()); in checkCall_bcopy()
432 void WalkAST::checkCall_bzero(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_bzero() argument
458 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_bzero()
463 CELoc, CE->getCallee()->getSourceRange()); in checkCall_bzero()
474 void WalkAST::checkCall_gets(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_gets() argument
496 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_gets()
502 CELoc, CE->getCallee()->getSourceRange()); in checkCall_gets()
510 void WalkAST::checkCall_getpw(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_getpw() argument
536 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_getpw()
542 CELoc, CE->getCallee()->getSourceRange()); in checkCall_getpw()
550 void WalkAST::checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_mktemp() argument
554 checkCall_mkstemp(CE, FD); in checkCall_mktemp()
577 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_mktemp()
584 CELoc, CE->getCallee()->getSourceRange()); in checkCall_mktemp()
591 void WalkAST::checkCall_mkstemp(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_mkstemp() argument
607 unsigned numArgs = CE->getNumArgs(); in checkCall_mkstemp()
612 dyn_cast<StringLiteral>(CE->getArg((unsigned)ArgSuffix.first) in checkCall_mkstemp()
629 const Expr *suffixEx = CE->getArg((unsigned)ArgSuffix.second); in checkCall_mkstemp()
649 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_mkstemp()
676 void WalkAST::checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_strcpy() argument
680 if (!checkCall_strCommon(CE, FD)) in checkCall_strcpy()
683 const auto *Target = CE->getArg(0)->IgnoreImpCasts(), in checkCall_strcpy()
684 *Source = CE->getArg(1)->IgnoreImpCasts(); in checkCall_strcpy()
696 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_strcpy()
705 CELoc, CE->getCallee()->getSourceRange()); in checkCall_strcpy()
715 void WalkAST::checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_strcat() argument
719 if (!checkCall_strCommon(CE, FD)) in checkCall_strcat()
724 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_strcat()
733 CELoc, CE->getCallee()->getSourceRange()); in checkCall_strcat()
752 void WalkAST::checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE, in checkDeprecatedOrUnsafeBufferHandling() argument
785 dyn_cast<StringLiteral>(CE->getArg(ArgIndex)->IgnoreParenImpCasts()); in checkDeprecatedOrUnsafeBufferHandling()
811 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkDeprecatedOrUnsafeBufferHandling()
815 CE->getCallee()->getSourceRange()); in checkDeprecatedOrUnsafeBufferHandling()
822 bool WalkAST::checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_strCommon() argument
858 void WalkAST::checkCall_rand(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_rand() argument
890 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_rand()
893 CE->getCallee()->getSourceRange()); in checkCall_rand()
897 void WalkAST::checkCall_random(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_random() argument
911 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_random()
917 "instead", CELoc, CE->getCallee()->getSourceRange()); in checkCall_random()
925 void WalkAST::checkCall_vfork(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_vfork() argument
931 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_vfork()
940 CELoc, CE->getCallee()->getSourceRange()); in checkCall_vfork()
1008 void WalkAST::checkUncheckedReturnValue(CallExpr *CE) { in checkUncheckedReturnValue() argument
1012 const FunctionDecl *FD = CE->getDirectCallee(); in checkUncheckedReturnValue()
1062 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkUncheckedReturnValue()
1065 CE->getCallee()->getSourceRange()); in checkUncheckedReturnValue()