Lines Matching refs:CE
87 void VisitCallExpr(CallExpr *CE);
88 void VisitObjCMessageExpr(ObjCMessageExpr *CE);
96 bool checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD);
103 void checkCall_bcmp(const CallExpr *CE, const FunctionDecl *FD);
104 void checkCall_bcopy(const CallExpr *CE, const FunctionDecl *FD);
105 void checkCall_bzero(const CallExpr *CE, const FunctionDecl *FD);
106 void checkCall_gets(const CallExpr *CE, const FunctionDecl *FD);
107 void checkCall_getpw(const CallExpr *CE, const FunctionDecl *FD);
108 void checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD);
109 void checkCall_mkstemp(const CallExpr *CE, const FunctionDecl *FD);
110 void checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD);
111 void checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD);
112 void checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE,
114 void checkCall_rand(const CallExpr *CE, const FunctionDecl *FD);
115 void checkCall_random(const CallExpr *CE, const FunctionDecl *FD);
116 void checkCall_vfork(const CallExpr *CE, const FunctionDecl *FD);
118 void checkUncheckedReturnValue(CallExpr *CE);
132 void WalkAST::VisitCallExpr(CallExpr *CE) { in VisitCallExpr() argument
134 const FunctionDecl *FD = CE->getDirectCallee(); in VisitCallExpr()
184 (this->*evalFunction)(CE, FD); in VisitCallExpr()
187 VisitChildren(CE); in VisitCallExpr()
207 if (CallExpr *CE = dyn_cast<CallExpr>(Child)) in VisitCompoundStmt() local
208 checkUncheckedReturnValue(CE); in VisitCompoundStmt()
349 void WalkAST::checkCall_bcmp(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_bcmp() argument
377 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_bcmp()
382 CELoc, CE->getCallee()->getSourceRange()); in checkCall_bcmp()
391 void WalkAST::checkCall_bcopy(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_bcopy() argument
419 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_bcopy()
425 CELoc, CE->getCallee()->getSourceRange()); in checkCall_bcopy()
434 void WalkAST::checkCall_bzero(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_bzero() argument
460 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_bzero()
465 CELoc, CE->getCallee()->getSourceRange()); in checkCall_bzero()
476 void WalkAST::checkCall_gets(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_gets() argument
498 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_gets()
504 CELoc, CE->getCallee()->getSourceRange()); in checkCall_gets()
512 void WalkAST::checkCall_getpw(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_getpw() argument
538 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_getpw()
544 CELoc, CE->getCallee()->getSourceRange()); in checkCall_getpw()
552 void WalkAST::checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_mktemp() argument
556 checkCall_mkstemp(CE, FD); in checkCall_mktemp()
579 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_mktemp()
586 CELoc, CE->getCallee()->getSourceRange()); in checkCall_mktemp()
593 void WalkAST::checkCall_mkstemp(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_mkstemp() argument
609 unsigned numArgs = CE->getNumArgs(); in checkCall_mkstemp()
614 dyn_cast<StringLiteral>(CE->getArg((unsigned)ArgSuffix.first) in checkCall_mkstemp()
631 const Expr *suffixEx = CE->getArg((unsigned)ArgSuffix.second); in checkCall_mkstemp()
651 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_mkstemp()
678 void WalkAST::checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_strcpy() argument
682 if (!checkCall_strCommon(CE, FD)) in checkCall_strcpy()
685 const auto *Target = CE->getArg(0)->IgnoreImpCasts(), in checkCall_strcpy()
686 *Source = CE->getArg(1)->IgnoreImpCasts(); in checkCall_strcpy()
698 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_strcpy()
707 CELoc, CE->getCallee()->getSourceRange()); in checkCall_strcpy()
717 void WalkAST::checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_strcat() argument
721 if (!checkCall_strCommon(CE, FD)) in checkCall_strcat()
726 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_strcat()
735 CELoc, CE->getCallee()->getSourceRange()); in checkCall_strcat()
754 void WalkAST::checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE, in checkDeprecatedOrUnsafeBufferHandling() argument
787 dyn_cast<StringLiteral>(CE->getArg(ArgIndex)->IgnoreParenImpCasts()); in checkDeprecatedOrUnsafeBufferHandling()
813 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkDeprecatedOrUnsafeBufferHandling()
817 CE->getCallee()->getSourceRange()); in checkDeprecatedOrUnsafeBufferHandling()
824 bool WalkAST::checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_strCommon() argument
855 void WalkAST::checkCall_rand(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_rand() argument
887 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_rand()
890 CE->getCallee()->getSourceRange()); in checkCall_rand()
898 void WalkAST::checkCall_random(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_random() argument
912 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_random()
918 "instead", CELoc, CE->getCallee()->getSourceRange()); in checkCall_random()
926 void WalkAST::checkCall_vfork(const CallExpr *CE, const FunctionDecl *FD) { in checkCall_vfork() argument
932 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkCall_vfork()
941 CELoc, CE->getCallee()->getSourceRange()); in checkCall_vfork()
997 void WalkAST::checkUncheckedReturnValue(CallExpr *CE) { in checkUncheckedReturnValue() argument
1001 const FunctionDecl *FD = CE->getDirectCallee(); in checkUncheckedReturnValue()
1051 PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); in checkUncheckedReturnValue()
1054 CE->getCallee()->getSourceRange()); in checkUncheckedReturnValue()