/external/llvm-project/clang/lib/StaticAnalyzer/Core/ |
D | SimpleConstraintManager.cpp | 38 Cond = SVB.evalCast(*LV, SVB.getContext().BoolTy, T).castAs<DefinedSVal>(); in assume() 41 return assume(State, Cond.castAs<NonLoc>(), Assumption); in assume() 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 assume(State, Cond.castAs<nonloc::LocAsInteger>().getLoc(), in assumeAux() 122 const llvm::APSInt &IntVal = Value.castAs<nonloc::ConcreteInt>().getValue(); in assumeInclusiveRange()
|
D | SVals.cpp | 280 castAs<NonLoc>().dumpToStream(os); in dumpToStream() 283 castAs<Loc>().dumpToStream(os); in dumpToStream() 294 const auto &Value = castAs<nonloc::ConcreteInt>().getValue(); in dumpToStream() 300 os << castAs<nonloc::SymbolVal>().getSymbol(); in dumpToStream() 304 const nonloc::LocAsInteger& C = castAs<nonloc::LocAsInteger>(); in dumpToStream() 309 const nonloc::CompoundVal& C = castAs<nonloc::CompoundVal>(); in dumpToStream() 325 const nonloc::LazyCompoundVal &C = castAs<nonloc::LazyCompoundVal>(); in dumpToStream() 334 castAs<nonloc::PointerToMember>(); in dumpToStream() 360 os << castAs<loc::ConcreteInt>().getValue().getZExtValue() << " (Loc)"; in dumpToStream() 363 os << "&&" << castAs<loc::GotoLabel>().getLabel()->getName(); in dumpToStream() [all …]
|
D | SValBuilder.cpp | 110 return evalCastFromNonLoc(val.castAs<NonLoc>(), ArrayIndexTy); in convertToArrayIndex() 430 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp() 439 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp() 442 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp() 459 .castAs<DefinedOrUnknownSVal>(); in evalEQ() 516 .castAs<NonLoc>(); in evalIntegralCast() 519 NonLoc FromVal = val.castAs<NonLoc>(); in evalIntegralCast() 522 evalBinOpNN(state, BO_LE, FromVal, ToTypeMaxVal, CmpTy).castAs<NonLoc>(); in evalIntegralCast() 559 Loc L = val.castAs<nonloc::LocAsInteger>().getLoc(); in evalCast() 571 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast() [all …]
|
D | SimpleSValBuilder.cpp | 70 return Val.getAs<Loc>() ? evalCastFromLoc(Val.castAs<Loc>(), CastTy) in dispatchCast() 71 : evalCastFromNonLoc(Val.castAs<NonLoc>(), CastTy); in dispatchCast() 112 bool b = val.castAs<nonloc::ConcreteInt>().getValue().getBoolValue(); in evalCastFromNonLoc() 121 llvm::APSInt i = val.castAs<nonloc::ConcreteInt>().getValue(); in evalCastFromNonLoc() 151 const MemRegion *R = val.castAs<loc::MemRegionVal>().getRegion(); in evalCastFromLoc() 180 llvm::APSInt i = val.castAs<loc::ConcreteInt>().getValue(); in evalCastFromLoc() 198 return val.castAs<nonloc::ConcreteInt>().evalMinus(*this); in evalMinus() 207 return X.castAs<nonloc::ConcreteInt>().evalComplement(*this); in evalComplement() 399 .castAs<NonLoc>(); in doRearrangeUnchecked() 541 auto LPTM = lhs.castAs<nonloc::PointerToMember>(), in evalBinOpNN() [all …]
|
D | Store.cpp | 55 Store = Bind(Store.getStore(), I.first.castAs<Loc>(), I.second); in enterStackFrame() 443 Loc BaseL = Base.castAs<Loc>(); in getLValueFieldOrIvar() 448 BaseR = cast<SubRegion>(BaseL.castAs<loc::MemRegionVal>().getRegion()); in getLValueFieldOrIvar() 497 Base.castAs<loc::MemRegionVal>().getRegionAs<SubRegion>(); in getLValueElement() 503 Offset = svalBuilder.convertToArrayIndex(Offset).castAs<NonLoc>(); in getLValueElement() 523 BaseIdx.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement() 536 const llvm::APSInt& OffI = Offset.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement()
|
D | ProgramState.cpp | 135 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefaultInitial() 144 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefaultZero() 343 Idx.castAs<NonLoc>(), Min, indexTy); in assumeInBound() 349 svalBuilder.evalBinOpNN(this, BO_Add, UpperBound.castAs<NonLoc>(), in assumeInBound() 356 SVal inBound = svalBuilder.evalBinOpNN(this, BO_LT, newIdx.castAs<NonLoc>(), in assumeInBound() 357 newBound.castAs<NonLoc>(), Ctx.IntTy); in assumeInBound() 363 return CM.assume(this, inBound.castAs<DefinedSVal>(), Assumption); in assumeInBound()
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | SVals.cpp | 247 castAs<NonLoc>().dumpToStream(os); in dumpToStream() 250 castAs<Loc>().dumpToStream(os); in dumpToStream() 261 const nonloc::ConcreteInt& C = castAs<nonloc::ConcreteInt>(); in dumpToStream() 271 os << castAs<nonloc::SymbolVal>().getSymbol(); in dumpToStream() 275 const nonloc::LocAsInteger& C = castAs<nonloc::LocAsInteger>(); in dumpToStream() 280 const nonloc::CompoundVal& C = castAs<nonloc::CompoundVal>(); in dumpToStream() 296 const nonloc::LazyCompoundVal &C = castAs<nonloc::LazyCompoundVal>(); in dumpToStream() 311 os << castAs<loc::ConcreteInt>().getValue().getZExtValue() << " (Loc)"; in dumpToStream() 314 os << "&&" << castAs<loc::GotoLabel>().getLabel()->getName(); in dumpToStream() 317 os << '&' << castAs<loc::MemRegionVal>().getRegion()->getString(); in dumpToStream()
|
D | SValBuilder.cpp | 87 return evalCastFromNonLoc(val.castAs<NonLoc>(), ArrayIndexTy); in convertToArrayIndex() 379 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp() 388 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp() 391 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp() 399 .castAs<DefinedOrUnknownSVal>(); in evalEQ() 453 .castAs<NonLoc>(); in evalIntegralCast() 456 NonLoc FromVal = val.castAs<NonLoc>(); in evalIntegralCast() 459 evalBinOpNN(state, BO_LE, FromVal, ToTypeMaxVal, CmpTy).castAs<NonLoc>(); in evalIntegralCast() 496 Loc L = val.castAs<nonloc::LocAsInteger>().getLoc(); in evalCast() 508 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast() [all …]
|
D | SimpleSValBuilder.cpp | 64 return Val.getAs<Loc>() ? evalCastFromLoc(Val.castAs<Loc>(), CastTy) in dispatchCast() 65 : evalCastFromNonLoc(Val.castAs<NonLoc>(), CastTy); in dispatchCast() 106 bool b = val.castAs<nonloc::ConcreteInt>().getValue().getBoolValue(); in evalCastFromNonLoc() 115 llvm::APSInt i = val.castAs<nonloc::ConcreteInt>().getValue(); in evalCastFromNonLoc() 145 const MemRegion *R = val.castAs<loc::MemRegionVal>().getRegion(); in evalCastFromLoc() 172 llvm::APSInt i = val.castAs<loc::ConcreteInt>().getValue(); in evalCastFromLoc() 190 return val.castAs<nonloc::ConcreteInt>().evalMinus(*this); in evalMinus() 199 return X.castAs<nonloc::ConcreteInt>().evalComplement(*this); in evalComplement() 339 Loc lhsL = lhs.castAs<nonloc::LocAsInteger>().getLoc(); in evalBinOpNN() 343 rhs.castAs<nonloc::LocAsInteger>().getLoc(), in evalBinOpNN() [all …]
|
D | SimpleConstraintManager.cpp | 81 Cond = SVB.evalCast(*LV, SVB.getContext().BoolTy, T).castAs<DefinedSVal>(); in assume() 84 return assume(state, Cond.castAs<NonLoc>(), Assumption); in assume() 131 nonloc::SymbolVal SV = Cond.castAs<nonloc::SymbolVal>(); in assumeAux() 182 bool b = Cond.castAs<nonloc::ConcreteInt>().getValue() != 0; in assumeAux() 188 return assume(state, Cond.castAs<nonloc::LocAsInteger>().getLoc(), in assumeAux() 221 const llvm::APSInt &IntVal = Value.castAs<nonloc::ConcreteInt>().getValue(); in assumeWithinInclusiveRange()
|
D | Store.cpp | 392 Loc BaseL = Base.castAs<Loc>(); in getLValueFieldOrIvar() 397 BaseR = BaseL.castAs<loc::MemRegionVal>().getRegion(); in getLValueFieldOrIvar() 437 const MemRegion* BaseRegion = Base.castAs<loc::MemRegionVal>().getRegion(); in getLValueElement() 443 Offset = svalBuilder.convertToArrayIndex(Offset).castAs<NonLoc>(); in getLValueElement() 465 BaseIdx.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement() 479 const llvm::APSInt& OffI = Offset.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement()
|
/external/llvm-project/clang/lib/Analysis/ |
D | ProgramPoint.cpp | 63 << castAs<BlockEntrance>().getBlock()->getBlockID(); in printJson() 98 << castAs<LoopExit>().getLoopStmt()->getStmtClassName() << '\"'; in printJson() 102 ImplicitCallPoint PC = castAs<ImplicitCallPoint>(); in printJson() 111 ImplicitCallPoint PC = castAs<ImplicitCallPoint>(); in printJson() 121 const CXXCtorInitializer *Init = castAs<PostInitializer>().getInitializer(); in printJson() 135 const BlockEdge &E = castAs<BlockEdge>(); in printJson() 187 const Stmt *S = castAs<StmtPoint>().getStmt(); in printJson()
|
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
D | ArrayBoundCheckerV2.cpp | 59 NonLoc getByteOffset() const { return byteOffset.castAs<NonLoc>(); } in getByteOffset() 150 NV->castAs<nonloc::ConcreteInt>(), in checkLocation() 189 Size.castAs<nonloc::ConcreteInt>(), svalBuilder); in checkLocation() 195 Size.castAs<NonLoc>(), in checkLocation() 300 return svalBuilder.evalBinOpNN(state, BO_Add, x.castAs<NonLoc>(), in addValue() 301 y.castAs<NonLoc>(), in addValue() 339 index.castAs<NonLoc>(), in computeOffset()
|
D | GTestChecker.cpp | 140 BooleanArgVal = C.getState()->getSVal(BooleanArgVal.castAs<Loc>()); in modelAssertionResultBoolConstructor() 278 C.getSValBuilder().evalEQ(State, Val1.castAs<DefinedOrUnknownSVal>(), in assumeValuesEqual() 279 Val2.castAs<DefinedOrUnknownSVal>()); in assumeValuesEqual() 285 State, ValuesEqual.castAs<DefinedSVal>(), true); in assumeValuesEqual()
|
D | VLASizeChecker.cpp | 104 SVB.makeIntVal(EleSize.getQuantity(), SizeTy).castAs<NonLoc>(); in checkVLA() 112 auto SizeD = C.getSVal(SizeE).castAs<DefinedSVal>(); in checkVLA() 115 SVB.evalCast(SizeD, SizeTy, SizeE->getType()).castAs<NonLoc>(); in checkVLA() 175 DefinedSVal SizeD = SizeV.castAs<DefinedSVal>(); in checkVLAIndexSize()
|
D | CStringChecker.cpp | 352 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in CheckLocation() 409 NonLoc One = svalBuilder.makeIntVal(1, SizeTy).castAs<NonLoc>(); in CheckBufferAccess() 413 NonLoc LastOffset = Offset.castAs<NonLoc>(); in CheckBufferAccess() 681 state->assume(willOverflow.castAs<DefinedOrUnknownSVal>()); in checkAdditionOverflow() 769 state = state->assume(evalLength.castAs<DefinedOrUnknownSVal>(), true); in getCStringLengthForRegion() 895 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in IsFirstBufInBound() 899 NonLoc LastOffset = Offset.castAs<NonLoc>(); in IsFirstBufInBound() 929 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in IsFirstBufInBound() 1110 State->assume(NewStrLenGESize.castAs<DefinedOrUnknownSVal>(), true), in memsetAux() 1311 State->getSVal(Left.Expression, LCtx).castAs<DefinedOrUnknownSVal>(); in evalMemcmp() [all …]
|
/external/llvm-project/clang/test/Analysis/ |
D | cast-value-notes.cpp | 10 const T *castAs() const; 174 const auto *C = S->castAs<Circle>(); in evalZeroParamNonNullReturnPointer() 185 const auto *C = S.castAs<Circle>(); in evalZeroParamNonNullReturn()
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | VLASizeChecker.cpp | 116 DefinedSVal sizeD = sizeV.castAs<DefinedSVal>(); in checkPreStmt() 156 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt() 164 state, BO_Mul, ArrayLength, EleSizeVal.castAs<NonLoc>(), SizeTy); in checkPreStmt() 170 DefinedOrUnknownSVal ArraySize = ArraySizeVal.castAs<DefinedOrUnknownSVal>(); in checkPreStmt()
|
D | ArrayBoundCheckerV2.cpp | 56 NonLoc getByteOffset() const { return byteOffset.castAs<NonLoc>(); } in getByteOffset() 147 extentVal.castAs<NonLoc>(), in checkLocation() 249 return svalBuilder.evalBinOpNN(state, BO_Add, x.castAs<NonLoc>(), in addValue() 250 y.castAs<NonLoc>(), in addValue() 288 index.castAs<NonLoc>(), in computeOffset()
|
D | CStringChecker.cpp | 300 DefinedOrUnknownSVal Size = Extent.castAs<DefinedOrUnknownSVal>(); in CheckLocation() 303 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in CheckLocation() 387 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess() 389 .evalBinOpNN(state, BO_Sub, *Length, One, sizeTy).castAs<NonLoc>(); in CheckBufferAccess() 597 state->assume(willOverflow.castAs<DefinedOrUnknownSVal>()); in checkAdditionOverflow() 702 state = state->assume(evalLength.castAs<DefinedOrUnknownSVal>(), true); in getCStringLengthForRegion() 853 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in IsFirstBufInBound() 856 .castAs<NonLoc>(); in IsFirstBufInBound() 883 DefinedOrUnknownSVal ExtentSize = Extent.castAs<DefinedOrUnknownSVal>(); in IsFirstBufInBound() 886 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in IsFirstBufInBound() [all …]
|
/external/clang/lib/AST/ |
D | CXXInheritance.cpp | 267 = cast<CXXRecordDecl>(BaseSpec.getType()->castAs<RecordType>() in lookupInBases() 361 return Specifier->getType()->castAs<RecordType>()->getDecl() in FindBaseClass() 371 Specifier->getType()->castAs<RecordType>()->getDecl() in FindVirtualBaseClass() 379 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindTagMember() 395 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindOrdinaryMember() 412 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindOMPReductionMember() 428 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindNestedNameSpecifierMember() 674 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in AddIndirectPrimaryBases() 696 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in getIndirectPrimaryBases()
|
/external/clang/lib/Sema/ |
D | TypeLocBuilder.h | 74 return pushImpl(T, LocalSize, LocalAlign).castAs<TypeSpecTypeLoc>(); in pushTypeSpec() 97 TyLocType Loc = TypeLoc(T, nullptr).castAs<TyLocType>(); in push() 100 return pushImpl(T, LocalSize, LocalAlign).castAs<TyLocType>(); in push()
|
/external/llvm-project/clang/lib/Sema/ |
D | TypeLocBuilder.h | 71 return pushImpl(T, LocalSize, LocalAlign).castAs<TypeSpecTypeLoc>(); in pushTypeSpec() 94 TyLocType Loc = TypeLoc(T, nullptr).castAs<TyLocType>(); in push() 97 return pushImpl(T, LocalSize, LocalAlign).castAs<TyLocType>(); in push()
|
/external/llvm-project/clang/lib/AST/ |
D | VTTBuilder.cpp | 68 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in LayoutSecondaryVTTs() 94 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in LayoutSecondaryVirtualPointers() 158 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in LayoutVirtualVTTs()
|
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/ |
D | UseDefaultMemberInitCheck.cpp | 38 switch (InitType->castAs<BuiltinType>()->getKind()) { in getValueOfValueInit() 56 switch (InitType->castAs<BuiltinType>()->getKind()) { in getValueOfValueInit() 67 InitType->castAs<ComplexType>()->getElementType()); in getValueOfValueInit() 70 switch (InitType->castAs<BuiltinType>()->getKind()) { in getValueOfValueInit()
|