Home
last modified time | relevance | path

Searched refs:castAs (Results 1 – 25 of 107) 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()
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()
313 Loc lhsL = lhs.castAs<nonloc::LocAsInteger>().getLoc(); in evalBinOpNN()
317 rhs.castAs<nonloc::LocAsInteger>().getLoc(), in evalBinOpNN()
321 llvm::APSInt i = rhs.castAs<nonloc::ConcreteInt>().getValue(); in evalBinOpNN()
[all …]
DSimpleConstraintManager.cpp73 return assume(state, Cond.castAs<Loc>(), Assumption); in assume()
93 const MemRegion *R = Cond.castAs<loc::MemRegionVal>().getRegion(); in assumeAux()
111 bool b = Cond.castAs<loc::ConcreteInt>().getValue() != 0; in assumeAux()
162 nonloc::SymbolVal SV = Cond.castAs<nonloc::SymbolVal>(); in assumeAux()
213 bool b = Cond.castAs<nonloc::ConcreteInt>().getValue() != 0; in assumeAux()
219 return assumeAux(state, Cond.castAs<nonloc::LocAsInteger>().getLoc(), in assumeAux()
DSValBuilder.cpp87 return evalCastFromNonLoc(val.castAs<NonLoc>(), ArrayIndexTy); in convertToArrayIndex()
344 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp()
353 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp()
356 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp()
364 .castAs<DefinedOrUnknownSVal>(); in evalEQ()
427 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast()
453 val = StateMgr.ArrayToPointer(val.castAs<Loc>(), elemTy); in evalCast()
468 return evalCastFromLoc(val.castAs<Loc>(), castTy); in evalCast()
DStore.cpp403 Loc BaseL = Base.castAs<Loc>(); in getLValueFieldOrIvar()
408 BaseR = BaseL.castAs<loc::MemRegionVal>().getRegion(); in getLValueFieldOrIvar()
448 const MemRegion* BaseRegion = Base.castAs<loc::MemRegionVal>().getRegion(); in getLValueElement()
454 Offset = svalBuilder.convertToArrayIndex(Offset).castAs<NonLoc>(); in getLValueElement()
476 BaseIdx.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement()
490 const llvm::APSInt& OffI = Offset.castAs<nonloc::ConcreteInt>().getValue(); in getLValueElement()
DExprEngine.cpp284 ProcessStmt(const_cast<Stmt*>(E.castAs<CFGStmt>().getStmt()), Pred); in processCFGElement()
287 ProcessInitializer(E.castAs<CFGInitializer>().getInitializer(), Pred); in processCFGElement()
293 ProcessImplicitDtor(E.castAs<CFGImplicitDtor>(), Pred); in processCFGElement()
527 ProcessAutomaticObjDtor(D.castAs<CFGAutomaticObjDtor>(), Pred, Dst); in ProcessImplicitDtor()
530 ProcessBaseDtor(D.castAs<CFGBaseDtor>(), Pred, Dst); in ProcessImplicitDtor()
533 ProcessMemberDtor(D.castAs<CFGMemberDtor>(), Pred, Dst); in ProcessImplicitDtor()
536 ProcessTemporaryDtor(D.castAs<CFGTemporaryDtor>(), Pred, Dst); in ProcessImplicitDtor()
554 const MemRegion *Region = dest.castAs<loc::MemRegionVal>().getRegion(); in ProcessAutomaticObjDtor()
581 VisitCXXDestructor(BaseTy, BaseVal.castAs<loc::MemRegionVal>().getRegion(), in ProcessBaseDtor()
595 State->getLValue(Member, State->getSVal(ThisVal).castAs<Loc>()); in ProcessMemberDtor()
[all …]
DExprEngineC.cpp522 BlockEdge BE = N->getLocation().castAs<BlockEdge>(); in VisitLogicalExpr()
544 CFGStmt Elem = SrcBlock->rbegin()->castAs<CFGStmt>(); in VisitLogicalExpr()
551 DefinedOrUnknownSVal DefinedRHS = RHSVal.castAs<DefinedOrUnknownSVal>(); in VisitLogicalExpr()
644 SrcBlock = PP.castAs<BlockEdge>().getSrc(); in VisitGuardedExpr()
825 state = state->BindExpr(U, LCtx, evalComplement(V.castAs<NonLoc>())); in VisitUnaryOperator()
829 state = state->BindExpr(U, LCtx, evalMinus(V.castAs<NonLoc>())); in VisitUnaryOperator()
846 Result = evalBinOp(state, BO_EQ, V.castAs<NonLoc>(), X, in VisitUnaryOperator()
888 DefinedSVal V2 = V2_untested.castAs<DefinedSVal>(); in VisitIncrementDecrementOperator()
DProgramState.cpp127 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefault()
348 Idx.castAs<NonLoc>(), Min, indexTy); in assumeInBound()
354 svalBuilder.evalBinOpNN(this, BO_Add, UpperBound.castAs<NonLoc>(), in assumeInBound()
361 SVal inBound = svalBuilder.evalBinOpNN(this, BO_LT, newIdx.castAs<NonLoc>(), in assumeInBound()
362 newBound.castAs<NonLoc>(), Ctx.IntTy); in assumeInBound()
368 return CM.assume(this, inBound.castAs<DefinedSVal>(), Assumption); in assumeInBound()
/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.cpp283 DefinedOrUnknownSVal Size = Extent.castAs<DefinedOrUnknownSVal>(); in CheckLocation()
286 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in CheckLocation()
369 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
371 .evalBinOpNN(state, BO_Sub, *Length, One, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
579 state->assume(willOverflow.castAs<DefinedOrUnknownSVal>()); in checkAdditionOverflow()
932 loc::MemRegionVal destRegVal = destVal.castAs<loc::MemRegionVal>(); in evalCopyCommon()
1054 state->getSVal(Left, LCtx).castAs<DefinedOrUnknownSVal>(); in evalMemcmp()
1056 state->getSVal(Right, LCtx).castAs<DefinedOrUnknownSVal>(); in evalMemcmp()
1176 .castAs<DefinedOrUnknownSVal>()); in evalstrLengthCommon()
1193 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()
DReturnPointerRangeChecker.cpp49 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in checkPreStmt()
DArrayBoundChecker.cpp47 DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>(); in checkLocation()
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/Sema/
DTypeLocBuilder.h74 return pushImpl(T, LocalSize, LocalAlign).castAs<TypeSpecTypeLoc>(); in pushTypeSpec()
97 TyLocType Loc = TypeLoc(T, 0).castAs<TyLocType>(); in push()
100 return pushImpl(T, LocalSize, LocalAlign).castAs<TyLocType>(); in push()
/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()
DMangleNumberingContext.cpp30 return ++ManglingNumbers[Key->castAs<FunctionProtoType>()]; in getManglingNumber()
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()
/external/clang/include/clang/AST/
DTypeLocVisitor.h24 Visit##CLASSNAME(TyLoc.castAs<CLASSNAME>())
/external/clang/lib/CodeGen/
DCGExprComplex.cpp200 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitCXXScalarValueInitExpr()
206 QualType Elem = E->getType()->castAs<ComplexType>()->getElementType(); in VisitImplicitValueInitExpr()
388 SrcType = SrcType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
389 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitComplexToComplexCast()
403 DestType = DestType->castAs<ComplexType>()->getElementType(); in EmitScalarToComplexCast()
607 if (Op.Ty->castAs<ComplexType>()->getElementType()->isUnsignedIntegerType()) { in EmitBinDiv()
802 QualType Ty = E->getType()->castAs<ComplexType>()->getElementType(); in VisitInitListExpr()
815 CGF.ConvertType(E->getType()->castAs<ComplexType>()->getElementType()); in VisitVAArgExpr()
/external/clang/unittests/AST/
DSourceLocationTest.cpp162 Node.getUnqualifiedLoc().castAs<TemplateSpecializationTypeLoc>(); in getRange()
187 Node.getUnqualifiedLoc().castAs<UnaryTransformTypeLoc>(); in getRange()

12345