Home
last modified time | relevance | path

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

12345

/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()
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 …]
DSValBuilder.cpp87 return evalCastFromNonLoc(val.castAs<NonLoc>(), ArrayIndexTy); in convertToArrayIndex()
346 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp()
355 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp()
358 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp()
366 .castAs<DefinedOrUnknownSVal>(); in evalEQ()
424 Loc L = val.castAs<nonloc::LocAsInteger>().getLoc(); in evalCast()
436 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast()
462 val = StateMgr.ArrayToPointer(val.castAs<Loc>(), elemTy); in evalCast()
477 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast()
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()
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.cpp295 ProcessStmt(const_cast<Stmt*>(E.castAs<CFGStmt>().getStmt()), Pred); in processCFGElement()
298 ProcessInitializer(E.castAs<CFGInitializer>().getInitializer(), Pred); in processCFGElement()
301 ProcessNewAllocator(E.castAs<CFGNewAllocator>().getAllocatorExpr(), in processCFGElement()
309 ProcessImplicitDtor(E.castAs<CFGImplicitDtor>(), Pred); in processCFGElement()
543 ProcessAutomaticObjDtor(D.castAs<CFGAutomaticObjDtor>(), Pred, Dst); in ProcessImplicitDtor()
546 ProcessBaseDtor(D.castAs<CFGBaseDtor>(), Pred, Dst); in ProcessImplicitDtor()
549 ProcessMemberDtor(D.castAs<CFGMemberDtor>(), Pred, Dst); in ProcessImplicitDtor()
552 ProcessTemporaryDtor(D.castAs<CFGTemporaryDtor>(), Pred, Dst); in ProcessImplicitDtor()
555 ProcessDeleteDtor(D.castAs<CFGDeleteDtor>(), Pred, Dst); in ProcessImplicitDtor()
592 const MemRegion *Region = dest.castAs<loc::MemRegionVal>().getRegion(); in ProcessAutomaticObjDtor()
[all …]
DExprEngineC.cpp534 BlockEdge BE = N->getLocation().castAs<BlockEdge>(); in VisitLogicalExpr()
556 CFGStmt Elem = SrcBlock->rbegin()->castAs<CFGStmt>(); in VisitLogicalExpr()
563 DefinedOrUnknownSVal DefinedRHS = RHSVal.castAs<DefinedOrUnknownSVal>(); in VisitLogicalExpr()
654 SrcBlock = PP.castAs<BlockEdge>().getSrc(); in VisitGuardedExpr()
853 state = state->BindExpr(U, LCtx, evalComplement(V.castAs<NonLoc>())); in VisitUnaryOperator()
857 state = state->BindExpr(U, LCtx, evalMinus(V.castAs<NonLoc>())); in VisitUnaryOperator()
874 Result = evalBinOp(state, BO_EQ, V.castAs<NonLoc>(), X, in VisitUnaryOperator()
918 DefinedSVal V2 = V2_untested.castAs<DefinedSVal>(); in VisitIncrementDecrementOperator()
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()
DCoreEngine.cpp234 HandleBlockEdge(Loc.castAs<BlockEdge>(), Pred); in dispatchWorkItem()
238 HandleBlockEntrance(Loc.castAs<BlockEntrance>(), Pred); in dispatchWorkItem()
246 CallEnter CEnter = Loc.castAs<CallEnter>(); in dispatchWorkItem()
558 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()
248 return svalBuilder.evalBinOpNN(state, BO_Add, x.castAs<NonLoc>(), in addValue()
249 y.castAs<NonLoc>(), in addValue()
287 index.castAs<NonLoc>(), in computeOffset()
DVLASizeChecker.cpp117 DefinedSVal sizeD = sizeV.castAs<DefinedSVal>(); in checkPreStmt()
157 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt()
165 state, BO_Mul, ArrayLength, EleSizeVal.castAs<NonLoc>(), SizeTy); in checkPreStmt()
171 DefinedOrUnknownSVal ArraySize = ArraySizeVal.castAs<DefinedOrUnknownSVal>(); in checkPreStmt()
DCStringChecker.cpp287 DefinedOrUnknownSVal Size = Extent.castAs<DefinedOrUnknownSVal>(); in CheckLocation()
290 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in CheckLocation()
374 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
376 .evalBinOpNN(state, BO_Sub, *Length, One, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
585 state->assume(willOverflow.castAs<DefinedOrUnknownSVal>()); in checkAdditionOverflow()
690 state = state->assume(evalLength.castAs<DefinedOrUnknownSVal>(), true); in getCStringLengthForRegion()
967 loc::MemRegionVal destRegVal = destVal.castAs<loc::MemRegionVal>(); in evalCopyCommon()
976 CharPtrTy, Dest->getType()).castAs<loc::MemRegionVal>(); in evalCopyCommon()
1101 state->getSVal(Left, LCtx).castAs<DefinedOrUnknownSVal>(); in evalMemcmp()
1103 state->getSVal(Right, LCtx).castAs<DefinedOrUnknownSVal>(); in evalMemcmp()
[all …]
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()
DObjCSelfInitChecker.cpp256 unsigned selfFlags = getSelfFlags(state->getSVal(argV.castAs<Loc>()), C); in checkPreCall()
287 addSelfFlag(state, state->getSVal(argV.castAs<Loc>()), prevFlags, C); in checkPostCall()
313 addSelfFlag(state, state->getSVal(location.castAs<Loc>()), SelfFlag_Self, in checkLocation()
422 loc::MemRegionVal MRV = location.castAs<loc::MemRegionVal>(); in isSelfVar()
DObjCContainersChecker.cpp76 State->set<ArraySizeMap>(ArraySym, SizeV.castAs<DefinedSVal>())); in REGISTER_MAP_WITH_PROGRAMSTATE()
129 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/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.cpp152 SourceDecl->getType()->castAs<FunctionProtoType>(); in ResolveExceptionSpec()
164 return SourceDecl->getType()->castAs<FunctionProtoType>(); in ResolveExceptionSpec()
241 New->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec()
262 Old->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec()
806 if (New->getType()->castAs<FunctionProtoType>()->getExceptionSpecType() == in CheckOverridingFunctionExceptionSpec()
824 if (Old->getType()->castAs<FunctionProtoType>()->getExceptionSpecType() == in CheckOverridingFunctionExceptionSpec()
/external/clang/lib/AST/
DCXXInheritance.cpp264 = cast<CXXRecordDecl>(BaseSpec.getType()->castAs<RecordType>() in lookupInBases()
359 return Specifier->getType()->castAs<RecordType>()->getDecl() in FindBaseClass()
369 Specifier->getType()->castAs<RecordType>()->getDecl() in FindVirtualBaseClass()
377 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindTagMember()
394 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindOrdinaryMember()
413 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindNestedNameSpecifierMember()
660 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in AddIndirectPrimaryBases()
682 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in getIndirectPrimaryBases()
DTypeLoc.cpp117 CLASS##TypeLoc TLCasted = TL.castAs<CLASS##TypeLoc>(); \ in initializeImpl()
137 if (Cur.castAs<FunctionProtoTypeLoc>().getTypePtr() in getBeginLoc()
183 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/CodeGen/
DCGExprComplex.cpp206 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitCXXScalarValueInitExpr()
212 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitImplicitValueInitExpr()
399 SrcType = SrcType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
400 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
414 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitScalarToComplexCast()
577 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
579 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
581 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
583 Op.Ty->castAs<ComplexType>()->getElementType()); in EmitComplexBinOpLibCall()
785 if (Op.Ty->castAs<ComplexType>()->getElementType()->isUnsignedIntegerType()) { in EmitBinDiv()
[all …]
/external/clang/include/clang/AST/
DTypeLocVisitor.h24 Visit##CLASSNAME(TyLoc.castAs<CLASSNAME>())

12345