| /freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | UnixAPIChecker.cpp | 116 CheckOpen(C, CE); in checkPreStmt() 119 CheckOpenAt(C, CE); in checkPreStmt() 122 CheckPthreadOnce(C, CE); in checkPreStmt() 273 if (CE->getNumArgs() < 1) in CheckPthreadOnce() 358 if (CE->getNumArgs() != numArgs) in BasicAllocationCheck() 465 CheckCallocZero(C, CE); in checkPreStmt() 468 CheckMallocZero(C, CE); in checkPreStmt() 471 CheckReallocZero(C, CE); in checkPreStmt() 474 CheckReallocfZero(C, CE); in checkPreStmt() 477 CheckAllocaZero(C, CE); in checkPreStmt() [all …]
|
| H A D | ExprInspectionChecker.cpp | 84 if (!CE) in REGISTER_SET_WITH_PROGRAMSTATE() 129 (this->*Handler)(CE, C); in REGISTER_SET_WITH_PROGRAMSTATE() 135 if (CE->getNumArgs() == 0) in getArgumentValueString() 189 if (CE->getNumArgs() == 0) { in getArgExpr() 193 return CE->getArg(0); in getArgExpr() 198 const Expr *Arg = getArgExpr(CE, C); in getArgRegion() 230 ++ReachedStats[CE].NumTimesReached; in analyzerNumTimesReached() 231 if (!ReachedStats[CE].ExampleNode) { in analyzerNumTimesReached() 254 const Expr *Arg = getArgExpr(CE, C); in analyzerExplain() 441 if (CE->getNumArgs() < 2) { in analyzerDenote() [all …]
|
| H A D | CheckSecuritySyntaxOnly.cpp | 86 void VisitCallExpr(CallExpr *CE); 87 void VisitObjCMessageExpr(ObjCMessageExpr *CE); 117 void checkUncheckedReturnValue(CallExpr *CE); 131 void WalkAST::VisitCallExpr(CallExpr *CE) { in VisitCallExpr() argument 183 (this->*evalFunction)(CE, FD); in VisitCallExpr() 186 VisitChildren(CE); in VisitCallExpr() 207 checkUncheckedReturnValue(CE); in VisitCompoundStmt() 554 checkCall_mkstemp(CE, FD); in checkCall_mktemp() 607 unsigned numArgs = CE->getNumArgs(); in checkCall_mkstemp() 680 if (!checkCall_strCommon(CE, FD)) in checkCall_strcpy() [all …]
|
| H A D | CStringSyntaxChecker.cpp | 112 void VisitCallExpr(CallExpr *CE); 123 if (CE->getNumArgs() != 3) in containsBadStrncatPattern() 125 const Expr *DstArg = CE->getArg(0); in containsBadStrncatPattern() 126 const Expr *SrcArg = CE->getArg(1); in containsBadStrncatPattern() 127 const Expr *LenArg = CE->getArg(2); in containsBadStrncatPattern() 154 if (CE->getNumArgs() != 3) in containsBadStrlcpyStrlcatPattern() 156 const Expr *DstArg = CE->getArg(0); in containsBadStrlcpyStrlcatPattern() 157 const Expr *LenArg = CE->getArg(2); in containsBadStrlcpyStrlcatPattern() 219 if (containsBadStrncatPattern(CE)) { in VisitCallExpr() 220 const Expr *DstArg = CE->getArg(0); in VisitCallExpr() [all …]
|
| H A D | DebugIteratorModeling.cpp | 35 void analyzerIteratorDataField(const CallExpr *CE, CheckerContext &C, 62 const auto *CE = dyn_cast_or_null<CallExpr>(Call.getOriginExpr()); in evalCall() local 63 if (!CE) in evalCall() 70 (this->**Handler)(CE, C); in evalCall() 79 if (CE->getNumArgs() == 0) { in analyzerIteratorDataField() 85 SVal V = C.getSVal(CE->getArg(0)); in analyzerIteratorDataField() 88 State = State->BindExpr(CE, C.getLocationContext(), get(Pos)); in analyzerIteratorDataField() 90 State = State->BindExpr(CE, C.getLocationContext(), Default); in analyzerIteratorDataField() 98 analyzerIteratorDataField(CE, C, [](const IteratorPosition *P) { in analyzerIteratorPosition() 106 analyzerIteratorDataField(CE, C, [](const IteratorPosition *P) { in analyzerIteratorContainer() [all …]
|
| H A D | STLAlgorithmModeling.cpp | 28 bool evalFind(CheckerContext &C, const CallExpr *CE) const; 72 if (!CE) in evalCall() 79 return (this->**Handler)(C, CE); in evalCall() 88 if (!isIteratorType(CE->getArg(1)->getType())) in evalFind() 93 if (isIteratorType(CE->getArg(0)->getType())) { in evalFind() 94 Find(C, CE, 0); in evalFind() 100 if (isIteratorType(CE->getArg(2)->getType())) { in evalFind() 101 Find(C, CE, 1); in evalFind() 115 SVal Param = State->getSVal(CE->getArg(paramNum), LCtx); in Find() 117 auto StateFound = State->BindExpr(CE, LCtx, RetVal); in Find() [all …]
|
| H A D | DebugContainerModeling.cpp | 35 void analyzerContainerDataField(const CallExpr *CE, CheckerContext &C, 59 const auto *CE = dyn_cast_or_null<CallExpr>(Call.getOriginExpr()); in evalCall() local 60 if (!CE) in evalCall() 67 (this->**Handler)(CE, C); in evalCall() 75 if (CE->getNumArgs() == 0) { in analyzerContainerDataField() 81 const MemRegion *Cont = C.getSVal(CE->getArg(0)).getAsRegion(); in analyzerContainerDataField() 87 State = State->BindExpr(CE, C.getLocationContext(), in analyzerContainerDataField() 108 State = State->BindExpr(CE, C.getLocationContext(), in analyzerContainerDataField() 114 analyzerContainerDataField(CE, C, [](const ContainerData *D) { in analyzerContainerBegin() 119 void DebugContainerModeling::analyzerContainerEnd(const CallExpr *CE, in analyzerContainerEnd() argument [all …]
|
| H A D | ObjCContainersChecker.cpp | 78 void ObjCContainersChecker::checkPostStmt(const CallExpr *CE, in checkPostStmt() argument 80 StringRef Name = C.getCalleeName(CE); in checkPostStmt() 81 if (Name.empty() || CE->getNumArgs() < 1) in checkPostStmt() 86 if (CE->getNumArgs() < 3) in checkPostStmt() 91 addSizeInfo(CE, CE->getArg(2), C); in checkPostStmt() 96 addSizeInfo(CE->getArg(0), CE, C); in checkPostStmt() 101 void ObjCContainersChecker::checkPreStmt(const CallExpr *CE, in checkPreStmt() argument 103 StringRef Name = C.getCalleeName(CE); in checkPreStmt() 104 if (Name.empty() || CE->getNumArgs() < 2) in checkPreStmt() 113 const Expr *ArrayExpr = CE->getArg(0); in checkPreStmt() [all …]
|
| H A D | ObjCContainersASTChecker.cpp | 80 void VisitCallExpr(CallExpr *CE); 84 static StringRef getCalleeName(CallExpr *CE) { in getCalleeName() argument 85 const FunctionDecl *FD = CE->getDirectCallee(); in getCalleeName() 96 void WalkAST::VisitCallExpr(CallExpr *CE) { in VisitCallExpr() argument 97 StringRef Name = getCalleeName(CE); in VisitCallExpr() 105 if (CE->getNumArgs() != 4) in VisitCallExpr() 108 Arg = CE->getArg(ArgNum)->IgnoreParenCasts(); in VisitCallExpr() 112 if (CE->getNumArgs() != 6) in VisitCallExpr() 116 Arg = CE->getArg(ArgNum)->IgnoreParenCasts(); in VisitCallExpr() 120 Arg = CE->getArg(ArgNum)->IgnoreParenCasts(); in VisitCallExpr() [all …]
|
| H A D | StreamChecker.cpp | 578 if (!CE) in evalFopen() 621 if (!CE) in evalFreopen() 673 if (!CE) in evalFclose() 735 if (!CE) in evalFreadFwrite() 814 if (!CE) in evalFgetx() 900 if (!CE) in evalFputx() 961 if (!CE) in evalFprintf() 1003 if (!CE) in evalFscanf() 1064 if (!CE) in evalUngetc() 1104 if (!CE) in evalGetdelim() [all …]
|
| H A D | MacOSXAPIChecker.cpp | 41 void checkPreStmt(const CallExpr *CE, CheckerContext &C) const; 43 void CheckDispatchOnce(CheckerContext &C, const CallExpr *CE, 67 void MacOSXAPIChecker::CheckDispatchOnce(CheckerContext &C, const CallExpr *CE, in CheckDispatchOnce() argument 69 if (CE->getNumArgs() < 1) in CheckDispatchOnce() 74 const MemRegion *R = C.getSVal(CE->getArg(0)).getAsRegion(); in CheckDispatchOnce() 88 if (CE->getBeginLoc().isMacroID()) { in CheckDispatchOnce() 143 report->addRange(CE->getArg(0)->getSourceRange()); in CheckDispatchOnce() 151 void MacOSXAPIChecker::checkPreStmt(const CallExpr *CE, in checkPreStmt() argument 153 StringRef Name = C.getCalleeName(CE); in checkPreStmt() 166 (this->*SC)(C, CE, Name); in checkPreStmt()
|
| H A D | EnumCastOutOfRangeChecker.cpp | 64 void reportWarning(CheckerContext &C, const CastExpr *CE, 68 void checkPreStmt(const CastExpr *CE, CheckerContext &C) const; 84 const CastExpr *CE, in reportWarning() argument 92 C.getSVal(CE->getSubExpr()).getAs<nonloc::ConcreteInt>(); in reportWarning() 106 bugreporter::trackExpressionValue(N, CE->getSubExpr(), *BR); in reportWarning() 114 void EnumCastOutOfRangeChecker::checkPreStmt(const CastExpr *CE, in checkPreStmt() argument 123 switch (CE->getCastKind()) { in checkPreStmt() 134 C.getSVal(CE->getSubExpr()).getAs<DefinedOrUnknownSVal>(); in checkPreStmt() 141 const QualType T = CE->getType(); in checkPreStmt() 171 reportWarning(C, CE, ED); in checkPreStmt()
|
| H A D | CastToStructChecker.cpp | 35 bool VisitCastExpr(const CastExpr *CE); 39 bool CastToStructVisitor::VisitCastExpr(const CastExpr *CE) { in VisitCastExpr() argument 40 const Expr *E = CE->getSubExpr(); in VisitCastExpr() 43 QualType ToTy = Ctx.getCanonicalType(CE->getType()); in VisitCastExpr() 63 SourceRange Sr[1] = {CE->getSourceRange()}; in VisitCastExpr() 64 PathDiagnosticLocation Loc(CE, BR.getSourceManager(), AC); in VisitCastExpr() 96 PathDiagnosticLocation Loc(CE, BR.getSourceManager(), AC); in VisitCastExpr() 102 Loc, CE->getSourceRange()); in VisitCastExpr()
|
| H A D | BuiltinFunctionChecker.cpp | 41 const Expr *CE = Call.getOriginExpr(); in evalCall() local 78 C.addTransition(state->BindExpr(CE, LCtx, Arg)); in evalCall() 86 SVB.getAllocaRegionVal(CE, C.getLocationContext(), C.blockCount()); in evalCall() 97 C.addTransition(state->BindExpr(CE, LCtx, R)); in evalCall() 109 if (CE->EvaluateAsInt(EVResult, C.getASTContext(), Expr::SE_NoSideEffects)) { in evalCall() 113 BVF.getAPSIntType(CE->getType()).apply(Result); in evalCall() 122 V = SVB.makeIntVal(0, CE->getType()); in evalCall() 125 C.addTransition(state->BindExpr(CE, LCtx, V)); in evalCall()
|
| H A D | NoReturnFunctionChecker.cpp | 34 void checkPostCall(const CallEvent &CE, CheckerContext &C) const; 40 void NoReturnFunctionChecker::checkPostCall(const CallEvent &CE, in checkPostCall() argument 44 if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(CE.getDecl())) in checkPostCall() 47 if (const CallExpr *CExpr = dyn_cast_or_null<CallExpr>(CE.getOriginExpr()); in checkPostCall() 53 if (!BuildSinks && CE.isGlobalCFunction()) { in checkPostCall() 54 if (const IdentifierInfo *II = CE.getCalleeIdentifier()) { in checkPostCall()
|
| /freebsd-14.2/contrib/netbsd-tests/lib/libc/sys/ |
| H A D | t_posix_fadvise.c | 108 #define CE(x, exp) \ in ATF_TC_BODY() macro 117 CE(posix_fadvise(fd, 0, 0, -1), EINVAL); in ATF_TC_BODY() 120 CE(posix_fadvise(fd, 0, 0, POSIX_FADV_NORMAL), 0); in ATF_TC_BODY() 122 CE(posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM), 0); in ATF_TC_BODY() 141 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY() 143 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY() 145 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY() 147 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY() 149 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY() 153 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/IR/ |
| H A D | ConstantsContext.h | 58 static bool classof(const ConstantExpr *CE) { in classof() argument 411 return CE->getShuffleMask(); 432 : Opcode(CE->getOpcode()), 434 SubclassData(CE->isCompare() ? CE->getPredicate() : 0), Ops(Operands), 440 : Opcode(CE->getOpcode()), 442 SubclassData(CE->isCompare() ? CE->getPredicate() : 0), 447 Storage.push_back(CE->getOperand(I)); 458 if (Opcode != CE->getOpcode()) 462 if (Ops.size() != CE->getNumOperands()) 464 if (SubclassData != (CE->isCompare() ? CE->getPredicate() : 0)) [all …]
|
| /freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/ |
| H A D | UncountedCallArgsChecker.cpp | 54 bool VisitCallExpr(const CallExpr *CE) { in checkASTDecl() 55 Checker->visitCallExpr(CE); in checkASTDecl() 64 void visitCallExpr(const CallExpr *CE) const { in visitCallExpr() 65 if (shouldSkipCall(CE)) in visitCallExpr() 68 if (auto *F = CE->getDirectCallee()) { in visitCallExpr() 78 P < F->param_end() && ArgIdx < CE->getNumArgs(); ++P, ++ArgIdx) { in visitCallExpr() 92 const auto *Arg = CE->getArg(ArgIdx); in visitCallExpr() 120 bool shouldSkipCall(const CallExpr *CE) const { in shouldSkipCall() 121 if (CE->getNumArgs() == 0) in shouldSkipCall() 126 if (auto *MemberOp = dyn_cast<CXXOperatorCallExpr>(CE)) { in shouldSkipCall() [all …]
|
| /freebsd-14.2/contrib/llvm-project/clang/include/clang/AST/ |
| H A D | IgnoreExpr.h | 76 if (auto *CE = dyn_cast<CastExpr>(E)) in IgnoreCastsSingleStep() local 77 return CE->getSubExpr(); in IgnoreCastsSingleStep() 94 if (auto *CE = dyn_cast<CastExpr>(E)) in IgnoreLValueCastsSingleStep() local 95 if (CE->getCastKind() != CK_LValueToRValue) in IgnoreLValueCastsSingleStep() 102 if (auto *CE = dyn_cast<CastExpr>(E)) in IgnoreBaseCastsSingleStep() local 103 if (CE->getCastKind() == CK_DerivedToBase || in IgnoreBaseCastsSingleStep() 105 CE->getCastKind() == CK_NoOp) in IgnoreBaseCastsSingleStep() 106 return CE->getSubExpr(); in IgnoreBaseCastsSingleStep() 164 else if (auto *CE = dyn_cast<ChooseExpr>(E)) { in IgnoreParensSingleStep() local 165 if (!CE->isConditionDependent()) in IgnoreParensSingleStep() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/XCore/ |
| H A D | XCoreLowerThreadLocal.cpp | 78 static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { in replaceConstantExprOp() argument 80 SmallVector<WeakTrackingVH, 8> WUsers(CE->users()); in replaceConstantExprOp() 87 if (PN->getIncomingValue(I) == CE) { in replaceConstantExprOp() 92 Instruction *NewInst = CE->getAsInstruction(InsertPos); in replaceConstantExprOp() 96 Instruction *NewInst = CE->getAsInstruction(Instr); in replaceConstantExprOp() 97 Instr->replaceUsesOfWith(CE, NewInst); in replaceConstantExprOp() 104 } while (CE->hasNUsesOrMore(1)); // We need to check because a recursive in replaceConstantExprOp() 106 CE->destroyConstant(); in replaceConstantExprOp() 117 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU); in rewriteNonInstructionUses() local 118 if (!CE || !replaceConstantExprOp(CE, P)) in rewriteNonInstructionUses()
|
| /freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/ |
| H A D | MPIChecker.cpp | 135 const MemRegion *MPIChecker::topRegionUsedByWait(const CallEvent &CE) const { in topRegionUsedByWait() 137 if (FuncClassifier->isMPI_Wait(CE.getCalleeIdentifier())) { in topRegionUsedByWait() 138 return CE.getArgSVal(0).getAsRegion(); in topRegionUsedByWait() 139 } else if (FuncClassifier->isMPI_Waitall(CE.getCalleeIdentifier())) { in topRegionUsedByWait() 140 return CE.getArgSVal(1).getAsRegion(); in topRegionUsedByWait() 148 const MemRegion *const MR, const CallEvent &CE, CheckerContext &Ctx) const { in allRegionsUsedByWait() argument 152 if (FuncClassifier->isMPI_Waitall(CE.getCalleeIdentifier())) { in allRegionsUsedByWait() 166 CE.getArgExpr(1)->getType()->getPointeeType()); in allRegionsUsedByWait() 174 CE.getArgExpr(1)->getType()->getPointeeType(), Idx, SuperRegion, in allRegionsUsedByWait() 179 } else if (FuncClassifier->isMPI_Wait(CE.getCalleeIdentifier())) { in allRegionsUsedByWait()
|
| /freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
| H A D | ExprEngineCXX.cpp | 566 const auto *CE = in bindRequiredArrayElementToEnvironment() local 587 assert(CE || CIE); in handleConstructor() 594 if (CE) { in handleConstructor() 604 State = State->BindExpr(CE, LCtx, State->getSVal(*L, CE->getType())); in handleConstructor() 605 Bldr.generateNode(CE, Pred, State); in handleConstructor() 616 CE ? CE->getConstructionKind() : CIE->getConstructionKind(); in handleConstructor() 657 State, CE, LCtx, in handleConstructor() 745 if (CE) { in handleConstructor() 779 if (CE && CE->getConstructor()->isTrivial() && in handleConstructor() 847 handleConstructor(CE, Pred, Dst); in VisitCXXConstructExpr() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUMCInstLower.h | 52 auto *CE = dyn_cast<ConstantExpr>(CV); in lowerAddrSpaceCast() local 57 if (CE && CE->getOpcode() == Instruction::AddrSpaceCast) { in lowerAddrSpaceCast() 58 auto Op = CE->getOperand(0); in lowerAddrSpaceCast() 61 auto DstAddr = CE->getType()->getPointerAddressSpace(); in lowerAddrSpaceCast()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/ARM/AsmParser/ |
| H A D | ARMAsmParser.cpp | 1239 if (!CE) in isImm0_255Expr() 4399 if (!CE || CE->getValue() < 0 || CE->getValue() > 255) in parseCoprocOptionOperand() 5196 if (!CE) in parsePKHImm() 5260 if (!CE) in parseShifterImm() 5309 if (!CE) in parseRotImm() 5446 if (!CE) in parseBitfield() 5469 if (!CE) in parseBitfield() 6580 if (CE) in isThumbI8Relocation() 7507 if (CE) in isARMMCExpr() 11887 if (!CE) in parseDirectivePad() [all …]
|
| /freebsd-14.2/contrib/llvm-project/clang/lib/Analysis/ |
| H A D | ThreadSafetyCommon.cpp | 42 switch (CE->getStmtClass()) { in getSourceLiteralString() 135 Ctx.NumArgs = CE->getNumArgs(); in translateAttrExpr() 136 Ctx.FunArgs = CE->getArgs(); in translateAttrExpr() 138 Ctx.NumArgs = CE->getNumArgs(); in translateAttrExpr() 139 Ctx.FunArgs = CE->getArgs(); in translateAttrExpr() 142 Ctx.NumArgs = CE->getNumArgs(); in translateAttrExpr() 143 Ctx.FunArgs = CE->getArgs(); in translateAttrExpr() 303 return translateCastExpr(CE, Ctx); in translate() 431 LRCallCtx.FunArgs = CE->getArgs(); in translateCallExpr() 443 return new (Arena) til::Call(E, CE); in translateCallExpr() [all …]
|