Home
last modified time | relevance | path

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

12345

/external/clang/lib/StaticAnalyzer/Core/
DSVals.cpp240 castAs<NonLoc>().dumpToStream(os); in dumpToStream()
243 castAs<Loc>().dumpToStream(os); in dumpToStream()
254 const nonloc::ConcreteInt& C = castAs<nonloc::ConcreteInt>(); in dumpToStream()
264 os << castAs<nonloc::SymbolVal>().getSymbol(); in dumpToStream()
268 const nonloc::LocAsInteger& C = castAs<nonloc::LocAsInteger>(); in dumpToStream()
273 const nonloc::CompoundVal& C = castAs<nonloc::CompoundVal>(); in dumpToStream()
289 const nonloc::LazyCompoundVal &C = castAs<nonloc::LazyCompoundVal>(); in dumpToStream()
304 os << castAs<loc::ConcreteInt>().getValue().getZExtValue() << " (Loc)"; in dumpToStream()
307 os << "&&" << castAs<loc::GotoLabel>().getLabel()->getName(); in dumpToStream()
310 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()
146 llvm::APSInt i = val.castAs<loc::ConcreteInt>().getValue(); in evalCastFromLoc()
164 return val.castAs<nonloc::ConcreteInt>().evalMinus(*this); in evalMinus()
173 return X.castAs<nonloc::ConcreteInt>().evalComplement(*this); in evalComplement()
340 Loc lhsL = lhs.castAs<nonloc::LocAsInteger>().getLoc(); in evalBinOpNN()
344 rhs.castAs<nonloc::LocAsInteger>().getLoc(), in evalBinOpNN()
348 llvm::APSInt i = rhs.castAs<nonloc::ConcreteInt>().getValue(); in evalBinOpNN()
[all …]
DSValBuilder.cpp87 return evalCastFromNonLoc(val.castAs<NonLoc>(), ArrayIndexTy); in convertToArrayIndex()
264 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp()
273 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp()
276 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp()
284 .castAs<DefinedOrUnknownSVal>(); in evalEQ()
331 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast()
355 val = StateMgr.ArrayToPointer(val.castAs<Loc>()); in evalCast()
370 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast()
DSimpleConstraintManager.cpp63 return assume(state, Cond.castAs<Loc>(), Assumption); in assume()
84 const MemRegion *R = Cond.castAs<loc::MemRegionVal>().getRegion(); in assumeAux()
106 bool b = Cond.castAs<loc::ConcreteInt>().getValue() != 0; in assumeAux()
174 nonloc::SymbolVal SV = Cond.castAs<nonloc::SymbolVal>(); in assumeAux()
206 bool b = Cond.castAs<nonloc::ConcreteInt>().getValue() != 0; in assumeAux()
212 return assumeAux(state, Cond.castAs<nonloc::LocAsInteger>().getLoc(), in assumeAux()
DStore.cpp380 Loc BaseL = Base.castAs<Loc>(); in getLValueFieldOrIvar()
385 BaseR = BaseL.castAs<loc::MemRegionVal>().getRegion(); in getLValueFieldOrIvar()
425 const MemRegion* BaseRegion = Base.castAs<loc::MemRegionVal>().getRegion(); in getLValueElement()
431 Offset = svalBuilder.convertToArrayIndex(Offset).castAs<NonLoc>(); in getLValueElement()
453 BaseIdx.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement()
467 const llvm::APSInt& OffI = Offset.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement()
DExprEngine.cpp254 ProcessStmt(const_cast<Stmt*>(E.castAs<CFGStmt>().getStmt()), Pred); in processCFGElement()
257 ProcessInitializer(E.castAs<CFGInitializer>().getInitializer(), Pred); in processCFGElement()
263 ProcessImplicitDtor(E.castAs<CFGImplicitDtor>(), Pred); in processCFGElement()
469 ProcessAutomaticObjDtor(D.castAs<CFGAutomaticObjDtor>(), Pred, Dst); in ProcessImplicitDtor()
472 ProcessBaseDtor(D.castAs<CFGBaseDtor>(), Pred, Dst); in ProcessImplicitDtor()
475 ProcessMemberDtor(D.castAs<CFGMemberDtor>(), Pred, Dst); in ProcessImplicitDtor()
478 ProcessTemporaryDtor(D.castAs<CFGTemporaryDtor>(), Pred, Dst); in ProcessImplicitDtor()
501 VisitCXXDestructor(varType, dest.castAs<loc::MemRegionVal>().getRegion(), in ProcessAutomaticObjDtor()
521 VisitCXXDestructor(BaseTy, BaseVal.castAs<loc::MemRegionVal>().getRegion(), in ProcessBaseDtor()
535 State->getLValue(Member, State->getSVal(ThisVal).castAs<Loc>()); in ProcessMemberDtor()
[all …]
DExprEngineC.cpp533 BlockEdge BE = N->getLocation().castAs<BlockEdge>(); in VisitLogicalExpr()
555 CFGStmt Elem = SrcBlock->rbegin()->castAs<CFGStmt>(); in VisitLogicalExpr()
562 DefinedOrUnknownSVal DefinedRHS = RHSVal.castAs<DefinedOrUnknownSVal>(); in VisitLogicalExpr()
648 SrcBlock = PP.castAs<BlockEdge>().getSrc(); in VisitGuardedExpr()
816 state = state->BindExpr(U, LCtx, evalComplement(V.castAs<NonLoc>())); in VisitUnaryOperator()
820 state = state->BindExpr(U, LCtx, evalMinus(V.castAs<NonLoc>())); in VisitUnaryOperator()
837 Result = evalBinOp(state, BO_EQ, V.castAs<NonLoc>(), X, in VisitUnaryOperator()
879 DefinedSVal V2 = V2_untested.castAs<DefinedSVal>(); in VisitIncrementDecrementOperator()
DProgramState.cpp135 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefault()
304 Idx.castAs<NonLoc>(), Min, indexTy); in assumeInBound()
310 svalBuilder.evalBinOpNN(this, BO_Add, UpperBound.castAs<NonLoc>(), in assumeInBound()
317 SVal inBound = svalBuilder.evalBinOpNN(this, BO_LT, newIdx.castAs<NonLoc>(), in assumeInBound()
318 newBound.castAs<NonLoc>(), Ctx.IntTy); in assumeInBound()
324 return CM.assume(this, inBound.castAs<DefinedSVal>(), Assumption); in assumeInBound()
DCoreEngine.cpp233 HandleBlockEdge(Loc.castAs<BlockEdge>(), Pred); in dispatchWorkItem()
237 HandleBlockEntrance(Loc.castAs<BlockEntrance>(), Pred); in dispatchWorkItem()
245 CallEnter CEnter = Loc.castAs<CallEnter>(); in dispatchWorkItem()
518 CFGStmt CS = (*Block)[Idx].castAs<CFGStmt>(); in enqueueStmtNode()
/external/clang/lib/StaticAnalyzer/Checkers/
DVLASizeChecker.cpp113 DefinedSVal sizeD = sizeV.castAs<DefinedSVal>(); in checkPreStmt()
134 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt()
142 state, BO_Mul, ArrayLength, EleSizeVal.castAs<NonLoc>(), SizeTy); in checkPreStmt()
148 DefinedOrUnknownSVal ArraySize = ArraySizeVal.castAs<DefinedOrUnknownSVal>(); in checkPreStmt()
DArrayBoundCheckerV2.cpp56 NonLoc getByteOffset() const { return byteOffset.castAs<NonLoc>(); } in getByteOffset()
147 extentVal.castAs<NonLoc>(), in checkLocation()
259 return svalBuilder.evalBinOpNN(state, BO_Add, x.castAs<NonLoc>(), in addValue()
260 y.castAs<NonLoc>(), in addValue()
298 index.castAs<NonLoc>(), in computeOffset()
DCStringChecker.cpp281 DefinedOrUnknownSVal Size = Extent.castAs<DefinedOrUnknownSVal>(); in CheckLocation()
284 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in CheckLocation()
367 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
369 .evalBinOpNN(state, BO_Sub, *Length, One, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
577 state->assume(willOverflow.castAs<DefinedOrUnknownSVal>()); in checkAdditionOverflow()
930 loc::MemRegionVal destRegVal = destVal.castAs<loc::MemRegionVal>(); in evalCopyCommon()
1052 state->getSVal(Left, LCtx).castAs<DefinedOrUnknownSVal>(); in evalMemcmp()
1054 state->getSVal(Right, LCtx).castAs<DefinedOrUnknownSVal>(); in evalMemcmp()
1174 .castAs<DefinedOrUnknownSVal>()); in evalstrLengthCommon()
1191 NonLoc resultNL = result.castAs<NonLoc>(); in evalstrLengthCommon()
[all …]
DUnixAPIChecker.cpp110 NonLoc oflags = V.castAs<NonLoc>(); in CheckOpen()
112 .makeIntVal(Val_O_CREAT.getValue(), oflagsEx->getType()).castAs<NonLoc>(); in CheckOpen()
118 DefinedSVal maskedFlags = maskedFlagsUC.castAs<DefinedSVal>(); in CheckOpen()
203 state->assume(argVal.castAs<DefinedSVal>()); in IsZeroByteAllocation()
DObjCSelfInitChecker.cpp258 unsigned selfFlags = getSelfFlags(state->getSVal(argV.castAs<Loc>()), C); in checkPreCall()
289 addSelfFlag(state, state->getSVal(argV.castAs<Loc>()), prevFlags, C); in checkPostCall()
315 addSelfFlag(state, state->getSVal(location.castAs<Loc>()), SelfFlag_Self, in checkLocation()
424 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.cpp47 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in checkLocation()
DReturnPointerRangeChecker.cpp49 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in checkPreStmt()
DObjCAtSyncChecker.cpp63 llvm::tie(notNullState, nullState) = state->assume(V.castAs<DefinedSVal>()); in checkPreStmt()
DNSErrorChecker.cpp228 setFlag<NSErrorOut>(state, state->getSVal(loc.castAs<Loc>()), C); in checkLocation()
233 setFlag<CFErrorOut>(state, state->getSVal(loc.castAs<Loc>()), C); in checkLocation()
/external/clang/lib/AST/
DCXXInheritance.cpp272 = cast<CXXRecordDecl>(BaseSpec->getType()->castAs<RecordType>() in lookupInBases()
379 return Specifier->getType()->castAs<RecordType>()->getDecl() in FindBaseClass()
389 Specifier->getType()->castAs<RecordType>()->getDecl() in FindVirtualBaseClass()
397 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindTagMember()
414 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindOrdinaryMember()
433 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindNestedNameSpecifierMember()
711 cast<CXXRecordDecl>(I->getType()->castAs<RecordType>()->getDecl()); in AddIndirectPrimaryBases()
734 cast<CXXRecordDecl>(I->getType()->castAs<RecordType>()->getDecl()); in getIndirectPrimaryBases()
DTypeLoc.cpp89 CLASS##TypeLoc TLCasted = TL.castAs<CLASS##TypeLoc>(); \ in initializeImpl()
109 if (Cur.castAs<FunctionProtoTypeLoc>().getTypePtr() in getBeginLoc()
155 if (Cur.castAs<FunctionProtoTypeLoc>().getTypePtr()->hasTrailingReturn()) in getEndLoc()
DLambdaMangleContext.cpp32 return ++ManglingNumbers[Key->castAs<FunctionProtoType>()]; in getManglingNumber()
/external/clang/lib/Sema/
DTypeLocBuilder.h78 return pushImpl(T, LocalSize).castAs<TypeSpecTypeLoc>(); in pushTypeSpec()
100 size_t LocalSize = TypeLoc(T, 0).castAs<TyLocType>().getLocalDataSize(); in push()
101 return pushImpl(T, LocalSize).castAs<TyLocType>(); in push()
/external/clang/lib/CodeGen/
DCGExprComplex.cpp192 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitCXXScalarValueInitExpr()
198 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitImplicitValueInitExpr()
365 SrcType = SrcType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
366 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
447 DestTy = DestTy->castAs<ComplexType>()->getElementType(); in EmitCast()
580 if (Op.Ty->castAs<ComplexType>()->getElementType()->isUnsignedIntegerType()) { in EmitBinDiv()
766 QualType Ty = E->getType()->castAs<ComplexType>()->getElementType(); in VisitInitListExpr()
779 CGF.ConvertType(E->getType()->castAs<ComplexType>()->getElementType()); in VisitVAArgExpr()
/external/clang/include/clang/AST/
DTypeLocVisitor.h24 Visit##CLASSNAME(TyLoc.castAs<CLASSNAME>())

12345