Home
last modified time | relevance | path

Searched refs:castAs (Results 1 – 25 of 121) 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()
374 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp()
383 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp()
386 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp()
394 .castAs<DefinedOrUnknownSVal>(); in evalEQ()
452 Loc L = val.castAs<nonloc::LocAsInteger>().getLoc(); in evalCast()
464 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast()
490 val = StateMgr.ArrayToPointer(val.castAs<Loc>(), elemTy); in evalCast()
505 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()
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.cpp296 ProcessStmt(const_cast<Stmt*>(E.castAs<CFGStmt>().getStmt()), Pred); in processCFGElement()
299 ProcessInitializer(E.castAs<CFGInitializer>().getInitializer(), Pred); in processCFGElement()
302 ProcessNewAllocator(E.castAs<CFGNewAllocator>().getAllocatorExpr(), in processCFGElement()
310 ProcessImplicitDtor(E.castAs<CFGImplicitDtor>(), Pred); in processCFGElement()
548 ProcessAutomaticObjDtor(D.castAs<CFGAutomaticObjDtor>(), Pred, Dst); in ProcessImplicitDtor()
551 ProcessBaseDtor(D.castAs<CFGBaseDtor>(), Pred, Dst); in ProcessImplicitDtor()
554 ProcessMemberDtor(D.castAs<CFGMemberDtor>(), Pred, Dst); in ProcessImplicitDtor()
557 ProcessTemporaryDtor(D.castAs<CFGTemporaryDtor>(), Pred, Dst); in ProcessImplicitDtor()
560 ProcessDeleteDtor(D.castAs<CFGDeleteDtor>(), Pred, Dst); in ProcessImplicitDtor()
597 const MemRegion *Region = dest.castAs<loc::MemRegionVal>().getRegion(); in ProcessAutomaticObjDtor()
[all …]
DExprEngineC.cpp559 BlockEdge BE = N->getLocation().castAs<BlockEdge>(); in VisitLogicalExpr()
581 CFGStmt Elem = SrcBlock->rbegin()->castAs<CFGStmt>(); in VisitLogicalExpr()
588 DefinedOrUnknownSVal DefinedRHS = RHSVal.castAs<DefinedOrUnknownSVal>(); in VisitLogicalExpr()
679 SrcBlock = PP.castAs<BlockEdge>().getSrc(); in VisitGuardedExpr()
876 state = state->BindExpr(U, LCtx, evalComplement(V.castAs<NonLoc>())); in VisitUnaryOperator()
880 state = state->BindExpr(U, LCtx, evalMinus(V.castAs<NonLoc>())); in VisitUnaryOperator()
897 Result = evalBinOp(state, BO_EQ, V.castAs<NonLoc>(), X, in VisitUnaryOperator()
941 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()
/external/clang/lib/StaticAnalyzer/Checkers/
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()
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()
DCStringChecker.cpp296 DefinedOrUnknownSVal Size = Extent.castAs<DefinedOrUnknownSVal>(); in CheckLocation()
299 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in CheckLocation()
383 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
385 .evalBinOpNN(state, BO_Sub, *Length, One, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
593 state->assume(willOverflow.castAs<DefinedOrUnknownSVal>()); in checkAdditionOverflow()
698 state = state->assume(evalLength.castAs<DefinedOrUnknownSVal>(), true); in getCStringLengthForRegion()
849 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in IsFirstBufInBound()
852 .castAs<NonLoc>(); in IsFirstBufInBound()
879 DefinedOrUnknownSVal ExtentSize = Extent.castAs<DefinedOrUnknownSVal>(); in IsFirstBufInBound()
882 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in IsFirstBufInBound()
[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.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()
421 loc::MemRegionVal MRV = location.castAs<loc::MemRegionVal>(); in isSelfVar()
DObjCContainersChecker.cpp81 State->set<ArraySizeMap>(ArraySym, SizeV.castAs<DefinedSVal>())); in REGISTER_MAP_WITH_PROGRAMSTATE()
135 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()
DObjCAtSyncChecker.cpp63 std::tie(notNullState, nullState) = state->assume(V.castAs<DefinedSVal>()); in checkPreStmt()
DDereferenceChecker.cpp198 DefinedOrUnknownSVal location = l.castAs<DefinedOrUnknownSVal>(); in checkLocation()
247 std::tie(StNonNull, StNull) = State->assume(V.castAs<DefinedOrUnknownSVal>()); in checkBind()
/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()
165 SourceDecl->getType()->castAs<FunctionProtoType>(); in ResolveExceptionSpec()
247 New->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec()
268 Old->getType()->castAs<FunctionProtoType>(); in CheckEquivalentExceptionSpec()
831 if (New->getType()->castAs<FunctionProtoType>()->getExceptionSpecType() == in CheckOverridingFunctionExceptionSpec()
849 if (Old->getType()->castAs<FunctionProtoType>()->getExceptionSpecType() == in CheckOverridingFunctionExceptionSpec()
/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()
413 Specifier->getType()->castAs<RecordType>()->getDecl(); in FindNestedNameSpecifierMember()
659 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in AddIndirectPrimaryBases()
681 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/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()
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()
[all …]
/external/clang/include/clang/AST/
DTypeLocVisitor.h24 Visit##CLASSNAME(TyLoc.castAs<CLASSNAME>())

12345