| /freebsd/contrib/llvm-project/clang/lib/Analysis/ |
| H A D | ProgramPoint.cpp | 114 if (const auto *B = castAs<BlockExit>().getBlock()) { in getSourceLocation() 131 if (const Stmt *S = castAs<StmtPoint>().getStmt()) in getSourceLocation() 135 if (const auto *Init = castAs<PostInitializer>().getInitializer()) in getSourceLocation() 139 if (const Stmt *S = castAs<CallEnter>().getCallExpr()) in getSourceLocation() 143 if (const Stmt *S = castAs<CallExitBegin>().getReturnStmt()) in getSourceLocation() 149 if (const auto *B = castAs<FunctionExitPoint>().getBlock(); in getSourceLocation() 154 return castAs<ImplicitCallPoint>().getLocation(); in getSourceLocation() 156 return castAs<ImplicitCallPoint>().getLocation(); in getSourceLocation() 158 if (const Stmt *S = castAs<LoopExit>().getLoopStmt()) in getSourceLocation() 179 << castAs<BlockEntrance>().getBlock()->getBlockID(); in printJson() [all …]
|
| H A D | FixitUtil.cpp | 48 PteTyLoc = TyLoc.castAs<PointerTypeLoc>().getPointeeLoc(); in getPointeeTypeText() 125 PtrTyLoc = TyLoc.castAs<ReferenceTypeLoc>().getPointeeLoc(); in getPointee2TypeText() 127 PteTyLoc = PtrTyLoc.castAs<PointerTypeLoc>().getPointeeLoc(); in getPointee2TypeText()
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
| H A D | SimpleConstraintManager.cpp | 38 Cond = SVB.evalCast(*LV, SVB.getContext().BoolTy, T).castAs<DefinedSVal>(); in assumeInternal() 41 return assume(State, Cond.castAs<NonLoc>(), Assumption); in assumeInternal() 70 nonloc::SymbolVal SV = Cond.castAs<nonloc::SymbolVal>(); in assumeAux() 77 bool b = *Cond.castAs<nonloc::ConcreteInt>().getValue() != 0; in assumeAux() 83 bool IsNull = !Cond.castAs<nonloc::PointerToMember>().isNullMemberPointer(); in assumeAux() 89 return assumeInternal(State, Cond.castAs<nonloc::LocAsInteger>().getLoc(), in assumeAux() 122 const llvm::APSInt &IntVal = Value.castAs<nonloc::ConcreteInt>().getValue(); in assumeInclusiveRangeInternal()
|
| H A D | SVals.cpp | 303 castAs<NonLoc>().dumpToStream(os); in dumpToStream() 307 castAs<Loc>().dumpToStream(os); in dumpToStream() 316 APSIntPtr Value = castAs<nonloc::ConcreteInt>().getValue(); in dumpToStream() 322 os << castAs<nonloc::SymbolVal>().getSymbol(); in dumpToStream() 326 const nonloc::LocAsInteger& C = castAs<nonloc::LocAsInteger>(); in dumpToStream() 331 const nonloc::CompoundVal& C = castAs<nonloc::CompoundVal>(); in dumpToStream() 347 const nonloc::LazyCompoundVal &C = castAs<nonloc::LazyCompoundVal>(); in dumpToStream() 356 castAs<nonloc::PointerToMember>(); in dumpToStream() 382 os << castAs<loc::ConcreteInt>().getValue()->getZExtValue() << " (Loc)"; in dumpToStream() 385 os << "&&" << castAs<loc::GotoLabel>().getLabel()->getName(); in dumpToStream() [all …]
|
| H A D | SymbolManager.cpp | 86 if (const auto *Init = Elem->castAs<CFGInitializer>().getInitializer()) { in getStmt() 91 return Elem->castAs<CFGScopeBegin>().getTriggerStmt(); in getStmt() 93 return Elem->castAs<CFGScopeEnd>().getTriggerStmt(); in getStmt() 95 return Elem->castAs<CFGNewAllocator>().getAllocatorExpr(); in getStmt() 97 return Elem->castAs<CFGLifetimeEnds>().getTriggerStmt(); in getStmt() 99 return Elem->castAs<CFGLoopExit>().getLoopStmt(); in getStmt() 101 return Elem->castAs<CFGStmt>().getStmt(); in getStmt() 103 return Elem->castAs<CFGConstructor>().getStmt(); in getStmt() 105 return Elem->castAs<CFGCXXRecordTypedCall>().getStmt(); in getStmt() 107 return Elem->castAs<CFGAutomaticObjDtor>().getTriggerStmt(); in getStmt() [all …]
|
| H A D | SValBuilder.cpp | 225 return makeZeroVal(type).castAs<DefinedSVal>(); in getConjuredHeapSymbolVal() 460 return makeIntVal(-X.castAs<nonloc::ConcreteInt>().getValue()); in evalMinus() 462 return makeNonLoc(X.castAs<nonloc::SymbolVal>().getSymbol(), UO_Minus, in evalMinus() 472 return makeIntVal(~X.castAs<nonloc::ConcreteInt>().getValue()); in evalComplement() 474 return makeNonLoc(X.castAs<nonloc::SymbolVal>().getSymbol(), UO_Not, in evalComplement() 518 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp() 529 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp() 536 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), RhsAsLoc, type); in evalBinOp() 540 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp() 557 .castAs<DefinedOrUnknownSVal>(); in evalEQ() [all …]
|
| H A D | Store.cpp | 54 BindResult Curr = Bind(S, Location.castAs<Loc>(), Val); in enterStackFrame() 404 Loc BaseL = Base.castAs<Loc>(); in getLValueFieldOrIvar() 409 BaseR = cast<SubRegion>(BaseL.castAs<loc::MemRegionVal>().getRegion()); in getLValueFieldOrIvar() 471 Base.castAs<loc::MemRegionVal>().getRegionAs<SubRegion>(); in getLValueElement() 507 BaseIdx.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement() 516 const llvm::APSInt& OffI = Offset.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement()
|
| H A D | ProgramState.cpp | 132 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefaultInitial() 141 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefaultZero() 337 Idx.castAs<NonLoc>(), Min, indexTy); in assumeInBoundDual() 343 svalBuilder.evalBinOpNN(this, BO_Add, UpperBound.castAs<NonLoc>(), in assumeInBoundDual() 350 SVal inBound = svalBuilder.evalBinOpNN(this, BO_LT, newIdx.castAs<NonLoc>(), in assumeInBoundDual() 351 newBound.castAs<NonLoc>(), Ctx.IntTy); in assumeInBoundDual() 357 return CM.assumeDual(this, inBound.castAs<DefinedSVal>()); in assumeInBoundDual()
|
| H A D | SimpleSValBuilder.cpp | 321 .castAs<NonLoc>(); in doRearrangeUnchecked() 470 auto LPTM = lhs.castAs<nonloc::PointerToMember>(), in evalBinOpNN() 471 RPTM = rhs.castAs<nonloc::PointerToMember>(); in evalBinOpNN() 483 Loc lhsL = lhs.castAs<nonloc::LocAsInteger>().getLoc(); in evalBinOpNN() 491 rhs.castAs<nonloc::LocAsInteger>().getLoc(), in evalBinOpNN() 502 llvm::APSInt i = rhs.castAs<nonloc::ConcreteInt>().getValue(); in evalBinOpNN() 527 llvm::APSInt LHSValue = lhs.castAs<nonloc::ConcreteInt>().getValue(); in evalBinOpNN() 610 SymbolRef Sym = lhs.castAs<nonloc::SymbolVal>().getSymbol(); in evalBinOpNN() 860 auto L = lhs.castAs<loc::ConcreteInt>(); in evalBinOpLL() 928 NonLoc l = evalCast(lhs, boolType, QualType{}).castAs<NonLoc>(); in evalBinOpLL() [all …]
|
| H A D | CheckerContext.cpp | 147 LHSVal.castAs<Loc>()); in evalComparison() 158 std::tie(StTrue, StFalse) = State->assume(Eval.castAs<DefinedSVal>()); in evalComparison()
|
| /freebsd/contrib/llvm-project/clang/lib/Sema/ |
| H A D | TypeLocBuilder.h | 79 return pushImpl(T, LocalSize, LocalAlign).castAs<TypeSpecTypeLoc>(); in pushTypeSpec() 103 TyLocType Loc = TypeLoc(T, nullptr).castAs<TyLocType>(); in push() 106 return pushImpl(T, LocalSize, LocalAlign).castAs<TyLocType>(); in push()
|
| H A D | SemaExceptionSpec.cpp | 167 PointeeT->castAs<RecordType>()->isBeingDefined()) && in CheckSpecifiedExceptionType() 220 SourceDecl->getType()->castAs<FunctionProtoType>(); in ResolveExceptionSpec() 233 SourceDecl->getType()->castAs<FunctionProtoType>(); in ResolveExceptionSpec() 255 FD->getType()->castAs<FunctionProtoType>()->getExceptionSpecType(); in exceptionSpecNotKnownYet() 288 auto *Ty = Decl->getTypeSourceInfo()->getType()->castAs<FunctionProtoType>(); in hasImplicitExceptionSpec() 346 const auto *NewProto = New->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec() 367 const auto *OldProto = Old->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec() 954 if (New->getType()->castAs<FunctionProtoType>()->getExceptionSpecType() == in CheckOverridingFunctionExceptionSpec() 979 Old->getType()->castAs<FunctionProtoType>(), in CheckOverridingFunctionExceptionSpec() 981 New->getType()->castAs<FunctionProtoType>(), in CheckOverridingFunctionExceptionSpec() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | VLASizeChecker.cpp | 102 SVB.makeIntVal(EleSize.getQuantity(), SizeTy).castAs<NonLoc>(); in checkVLA() 110 auto SizeD = C.getSVal(SizeE).castAs<DefinedSVal>(); in checkVLA() 113 SVB.evalCast(SizeD, SizeTy, SizeE->getType()).castAs<NonLoc>(); in checkVLA() 166 DefinedSVal SizeD = SizeV.castAs<DefinedSVal>(); in checkVLAIndexSize() 301 ArraySize.castAs<NonLoc>()); in checkPreStmt()
|
| H A D | CStringChecker.cpp | 423 .castAs<NonLoc>(); in getIndex() 428 return Offset.castAs<NonLoc>(); in getIndex() 490 .castAs<NonLoc>(); in checkInit() 511 SVB.evalBinOpNN(State, clang::BO_Div, Size.castAs<NonLoc>(), ElemSize, in checkInit() 516 const NonLoc One = SVB.makeIntVal(1, IdxTy).castAs<NonLoc>(); in checkInit() 528 State->getSVal(LastElementVal.castAs<Loc>()).isUndef()) { in checkInit() 644 NonLoc One = svalBuilder.makeIntVal(1, SizeTy).castAs<NonLoc>(); in CheckBufferAccess() 648 NonLoc LastOffset = Offset.castAs<NonLoc>(); in CheckBufferAccess() 839 Report->addVisitor<NoStoreFuncVisitor>(R->castAs<SubRegion>()); in emitUninitializedReadBug() 946 state->assume(willOverflow.castAs<DefinedOrUnknownSVal>()); in checkAdditionOverflow() [all …]
|
| H A D | ObjCSelfInitChecker.cpp | 253 getSelfFlags(state->getSVal(argV.castAs<Loc>()), C); in checkPreCall() 284 addSelfFlag(state, state->getSVal(argV.castAs<Loc>()), prevFlags, C); in checkPostCall() 310 addSelfFlag(state, state->getSVal(location.castAs<Loc>()), SelfFlag_Self, in checkLocation() 415 loc::MemRegionVal MRV = location.castAs<loc::MemRegionVal>(); in isSelfVar()
|
| H A D | UndefResultChecker.cpp | 47 const MemRegion *MR = Loc.castAs<loc::MemRegionVal>().getRegion(); in isArrayIndexOutOfBounds() 52 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in isArrayIndexOutOfBounds()
|
| H A D | ObjCContainersChecker.cpp | 75 State->set<ArraySizeMap>(ArraySym, SizeV.castAs<DefinedSVal>())); in REGISTER_MAP_WITH_PROGRAMSTATE() 128 DefinedSVal Idx = IdxVal.castAs<DefinedSVal>(); in checkPreStmt()
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ |
| H A D | VTTBuilder.cpp | 67 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in LayoutSecondaryVTTs() 93 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in LayoutSecondaryVirtualPointers() 157 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in LayoutVirtualVTTs()
|
| H A D | TypeLoc.cpp | 140 CLASS##TypeLoc TLCasted = TL.castAs<CLASS##TypeLoc>(); \ in initializeImpl() 162 dest.copyLocal(Source.castAs<CLASS##TypeLoc>()); \ 208 if (Cur.castAs<FunctionProtoTypeLoc>().getTypePtr() in getBeginLoc() 256 if (Cur.castAs<FunctionProtoTypeLoc>().getTypePtr()->hasTrailingReturn()) in getEndLoc() 263 if (Cur.castAs<ObjCObjectPointerTypeLoc>().getStarLoc().isInvalid()) in getEndLoc()
|
| /freebsd/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/ |
| H A D | CFGMatchSwitch.h | 77 return InitMS(*Element.castAs<CFGInitializer>().getInitializer(), in Build() 82 return StmtMS(*Element.castAs<CFGStmt>().getStmt(), Context, S); in Build()
|
| /freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
| H A D | CGExprComplex.cpp | 247 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitCXXScalarValueInitExpr() 253 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitImplicitValueInitExpr() 518 SrcType = SrcType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast() 519 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast() 536 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitScalarToComplexCast() 765 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall() 767 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall() 769 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall() 771 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall() 783 4, Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall() [all …]
|
| H A D | CGCXX.cpp | 87 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in TryEmitBaseDestructorAsAlias() 111 if (BaseD->getType()->castAs<FunctionType>()->getCallConv() != in TryEmitBaseDestructorAsAlias() 112 D->getType()->castAs<FunctionType>()->getCallConv()) in TryEmitBaseDestructorAsAlias()
|
| H A D | CGOpenCLRuntime.cpp | 82 const PipeType *PipeTy = PipeArg->getType()->castAs<PipeType>(); in getPipeElemSize() 92 const PipeType *PipeTy = PipeArg->getType()->castAs<PipeType>(); in getPipeElemAlign()
|
| /freebsd/contrib/llvm-project/clang/lib/CIR/CodeGen/ |
| H A D | CIRGenCXXExpr.cpp | 50 const auto *fpt = md->getType()->castAs<FunctionProtoType>(); in commonBuildCXXMemberOrOperatorCall() 103 emitCallArgs(*rtlArgs, md->getType()->castAs<FunctionProtoType>(), in emitCXXMemberOrOperatorMemberCallExpr() 180 const auto *fpt = md->getType()->castAs<FunctionProtoType>(); in emitCXXMemberOrOperatorCall() 299 allocator->getType()->castAs<FunctionProtoType>(); in emitCXXNewExpr()
|
| H A D | CIRGenClass.cpp | 46 if (ctor->getType()->castAs<FunctionProtoType>()->isVariadic()) in isConstructorDelegationValid() 123 cast<CXXRecordDecl>(baseType->castAs<RecordType>()->getDecl()); in isInitializerOfDynamicClass() 163 cast<CXXRecordDecl>(baseType->castAs<RecordType>()->getDecl()); in emitBaseInitializer() 461 const FunctionProtoType *fpt = d->getType()->castAs<FunctionProtoType>(); in emitCXXConstructorCall()
|