Home
last modified time | relevance | path

Searched refs:castAs (Results 1 – 25 of 126) sorted by relevance

123456

/external/clang/lib/StaticAnalyzer/Core/
DSVals.cpp247 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()
DSValBuilder.cpp87 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 …]
DSimpleSValBuilder.cpp64 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 …]
DSimpleConstraintManager.cpp81 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()
DStore.cpp392 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()
DExprEngine.cpp297 ProcessStmt(const_cast<Stmt*>(E.castAs<CFGStmt>().getStmt()), Pred); in processCFGElement()
300 ProcessInitializer(E.castAs<CFGInitializer>().getInitializer(), Pred); in processCFGElement()
303 ProcessNewAllocator(E.castAs<CFGNewAllocator>().getAllocatorExpr(), in processCFGElement()
311 ProcessImplicitDtor(E.castAs<CFGImplicitDtor>(), Pred); in processCFGElement()
549 ProcessAutomaticObjDtor(D.castAs<CFGAutomaticObjDtor>(), Pred, Dst); in ProcessImplicitDtor()
552 ProcessBaseDtor(D.castAs<CFGBaseDtor>(), Pred, Dst); in ProcessImplicitDtor()
555 ProcessMemberDtor(D.castAs<CFGMemberDtor>(), Pred, Dst); in ProcessImplicitDtor()
558 ProcessTemporaryDtor(D.castAs<CFGTemporaryDtor>(), Pred, Dst); in ProcessImplicitDtor()
561 ProcessDeleteDtor(D.castAs<CFGDeleteDtor>(), Pred, Dst); in ProcessImplicitDtor()
598 const MemRegion *Region = dest.castAs<loc::MemRegionVal>().getRegion(); in ProcessAutomaticObjDtor()
[all …]
DProgramState.cpp127 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefault()
327 Idx.castAs<NonLoc>(), Min, indexTy); in assumeInBound()
333 svalBuilder.evalBinOpNN(this, BO_Add, UpperBound.castAs<NonLoc>(), in assumeInBound()
340 SVal inBound = svalBuilder.evalBinOpNN(this, BO_LT, newIdx.castAs<NonLoc>(), in assumeInBound()
341 newBound.castAs<NonLoc>(), Ctx.IntTy); in assumeInBound()
347 return CM.assume(this, inBound.castAs<DefinedSVal>(), Assumption); in assumeInBound()
DExprEngineC.cpp570 BlockEdge BE = N->getLocation().castAs<BlockEdge>(); in VisitLogicalExpr()
592 CFGStmt Elem = SrcBlock->rbegin()->castAs<CFGStmt>(); in VisitLogicalExpr()
599 DefinedOrUnknownSVal DefinedRHS = RHSVal.castAs<DefinedOrUnknownSVal>(); in VisitLogicalExpr()
690 SrcBlock = PP.castAs<BlockEdge>().getSrc(); in VisitGuardedExpr()
887 state = state->BindExpr(U, LCtx, evalComplement(V.castAs<NonLoc>())); in VisitUnaryOperator()
891 state = state->BindExpr(U, LCtx, evalMinus(V.castAs<NonLoc>())); in VisitUnaryOperator()
908 Result = evalBinOp(state, BO_EQ, V.castAs<NonLoc>(), X, in VisitUnaryOperator()
952 DefinedSVal V2 = V2_untested.castAs<DefinedSVal>(); in VisitIncrementDecrementOperator()
DCoreEngine.cpp247 HandleBlockEdge(Loc.castAs<BlockEdge>(), Pred); in dispatchWorkItem()
251 HandleBlockEntrance(Loc.castAs<BlockEntrance>(), Pred); in dispatchWorkItem()
259 HandleCallEnter(Loc.castAs<CallEnter>(), Pred); in dispatchWorkItem()
575 CFGStmt CS = (*Block)[Idx].castAs<CFGStmt>(); in enqueueStmtNode()
/external/clang/lib/StaticAnalyzer/Checkers/
DArrayBoundCheckerV2.cpp56 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()
DVLASizeChecker.cpp116 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()
DCStringChecker.cpp300 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 …]
DObjCSelfInitChecker.cpp255 unsigned selfFlags = getSelfFlags(state->getSVal(argV.castAs<Loc>()), C); in checkPreCall()
286 addSelfFlag(state, state->getSVal(argV.castAs<Loc>()), prevFlags, C); in checkPostCall()
312 addSelfFlag(state, state->getSVal(location.castAs<Loc>()), SelfFlag_Self, in checkLocation()
418 loc::MemRegionVal MRV = location.castAs<loc::MemRegionVal>(); in isSelfVar()
DUnixAPIChecker.cpp137 NonLoc oflags = V.castAs<NonLoc>(); in CheckOpen()
139 .makeIntVal(Val_O_CREAT.getValue(), oflagsEx->getType()).castAs<NonLoc>(); in CheckOpen()
145 DefinedSVal maskedFlags = maskedFlagsUC.castAs<DefinedSVal>(); in CheckOpen()
222 state->assume(argVal.castAs<DefinedSVal>()); in IsZeroByteAllocation()
DObjCContainersChecker.cpp81 State->set<ArraySizeMap>(ArraySym, SizeV.castAs<DefinedSVal>())); in REGISTER_MAP_WITH_PROGRAMSTATE()
134 DefinedSVal Idx = IdxVal.castAs<DefinedSVal>(); in checkPreStmt()
DArrayBoundChecker.cpp48 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in checkLocation()
DReturnPointerRangeChecker.cpp50 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in checkPreStmt()
DNSErrorChecker.cpp230 setFlag<NSErrorOut>(state, state->getSVal(loc.castAs<Loc>()), C); in checkLocation()
235 setFlag<CFErrorOut>(state, state->getSVal(loc.castAs<Loc>()), C); in checkLocation()
/external/clang/lib/AST/
DCXXInheritance.cpp267 = 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()
DTypeLoc.cpp119 CLASS##TypeLoc TLCasted = TL.castAs<CLASS##TypeLoc>(); \ in initializeImpl()
139 dest.copyLocal(Source.castAs<CLASS##TypeLoc>()); \
179 if (Cur.castAs<FunctionProtoTypeLoc>().getTypePtr() in getBeginLoc()
225 if (Cur.castAs<FunctionProtoTypeLoc>().getTypePtr()->hasTrailingReturn()) in getEndLoc()
DMangle.cpp83 const FunctionType *FT = T->castAs<FunctionType>(); in getCallingConvMangling()
164 const FunctionType *FT = FD->getType()->castAs<FunctionType>(); in mangleName()
/external/clang/lib/Sema/
DTypeLocBuilder.h74 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()
DSemaExceptionSpec.cpp158 SourceDecl->getType()->castAs<FunctionProtoType>(); in ResolveExceptionSpec()
171 SourceDecl->getType()->castAs<FunctionProtoType>(); in ResolveExceptionSpec()
253 New->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec()
274 Old->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec()
837 if (New->getType()->castAs<FunctionProtoType>()->getExceptionSpecType() == in CheckOverridingFunctionExceptionSpec()
855 if (Old->getType()->castAs<FunctionProtoType>()->getExceptionSpecType() == in CheckOverridingFunctionExceptionSpec()
/external/clang/lib/CodeGen/
DCGExprComplex.cpp208 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitCXXScalarValueInitExpr()
214 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitImplicitValueInitExpr()
311 QualType eltType = complexType->castAs<ComplexType>()->getElementType(); in emitAddrOfImagComponent()
400 SrcType = SrcType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
401 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
416 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitScalarToComplexCast()
578 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
580 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
582 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
584 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
[all …]
/external/clang/include/clang/AST/
DTypeLocVisitor.h24 Visit##CLASSNAME(TyLoc.castAs<CLASSNAME>())

123456