Home
last modified time | relevance | path

Searched refs:NonLoc (Results 1 – 23 of 23) sorted by relevance

/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DSValBuilder.h53 virtual SVal evalCastFromNonLoc(NonLoc val, QualType castTy) = 0;
87 virtual SVal evalMinus(NonLoc val) = 0;
89 virtual SVal evalComplement(NonLoc val) = 0;
94 NonLoc lhs, NonLoc rhs, QualType resultTy) = 0;
105 Loc lhs, NonLoc rhs, QualType resultTy) = 0;
113 NonLoc lhs, NonLoc rhs, QualType resultTy);
212 NonLoc makeCompoundVal(QualType type, llvm::ImmutableList<SVal> vals) { in makeCompoundVal()
216 NonLoc makeLazyCompoundVal(const StoreRef &store, in makeLazyCompoundVal()
222 NonLoc makeZeroArrayIndex() { in makeZeroArrayIndex()
226 NonLoc makeArrayIndex(uint64_t idx) { in makeArrayIndex()
[all …]
DSVals.h266 class NonLoc : public DefinedSVal {
268 NonLoc() {} in NonLoc() function
269 explicit NonLoc(unsigned SubKind, const void *d) in NonLoc() function
313 class SymbolVal : public NonLoc {
315 SymbolVal(SymbolRef sym) : NonLoc(SymbolValKind, sym) {} in SymbolVal()
333 static bool isKind(const NonLoc& V) { in isKind()
339 class ConcreteInt : public NonLoc {
341 explicit ConcreteInt(const llvm::APSInt& V) : NonLoc(ConcreteIntKind, &V) {} in ConcreteInt()
363 static bool isKind(const NonLoc& V) { in isKind()
368 class LocAsInteger : public NonLoc {
[all …]
DExprEngine.h467 return X.isValid() ? svalBuilder.evalMinus(X.castAs<NonLoc>()) : X; in evalMinus()
471 return X.isValid() ? svalBuilder.evalComplement(X.castAs<NonLoc>()) : X; in evalComplement()
477 NonLoc L, NonLoc R, QualType T) { in evalBinOp()
482 NonLoc L, SVal R, QualType T) { in evalBinOp()
484 R.castAs<NonLoc>(), T) : R; in evalBinOp()
DConstraintManager.h103 NonLoc Value,
109 ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, in assumeWithinInclusiveRangeDual()
DProgramState.h668 assert(Val.getAs<NonLoc>() && "Only NonLocs are supported!"); in assumeWithinInclusiveRange()
671 this, Val.castAs<NonLoc>(), From, To, Assumption); in assumeWithinInclusiveRange()
681 assert(Val.getAs<NonLoc>() && "Only NonLocs are supported!"); in assumeWithinInclusiveRange()
684 ->assumeWithinInclusiveRangeDual(this, Val.castAs<NonLoc>(), From, To); in assumeWithinInclusiveRange()
722 if (Optional<NonLoc> N = Idx.getAs<NonLoc>()) in getLValue()
DMemRegion.h1012 NonLoc Index;
1014 ElementRegion(QualType elementType, NonLoc Idx, const MemRegion* sReg) in ElementRegion()
1027 NonLoc getIndex() const { return Index; } in getIndex()
1215 const ElementRegion *getElementRegion(QualType elementType, NonLoc Idx,
DStore.h102 virtual SVal getLValueElement(QualType elementType, NonLoc offset, SVal Base);
/external/clang/lib/StaticAnalyzer/Checkers/
DArrayBoundCheckerV2.cpp56 NonLoc getByteOffset() const { return byteOffset.castAs<NonLoc>(); } in getByteOffset()
113 if (Optional<NonLoc> NV = extentBegin.getAs<NonLoc>()) { in checkLocation()
118 Optional<NonLoc> lowerBoundToCheck = lowerBound.getAs<NonLoc>(); in checkLocation()
142 if (!extentVal.getAs<NonLoc>()) in checkLocation()
147 extentVal.castAs<NonLoc>(), in checkLocation()
150 Optional<NonLoc> upperboundToCheck = upperbound.getAs<NonLoc>(); in checkLocation()
233 NonLoc baseVal, CharUnits scaling, in scaleValue()
249 return svalBuilder.evalBinOpNN(state, BO_Add, x.castAs<NonLoc>(), in addValue()
250 y.castAs<NonLoc>(), in addValue()
276 if (!index.getAs<NonLoc>()) in computeOffset()
[all …]
DCStringChecker.cpp195 NonLoc left,
196 NonLoc right) const;
378 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckBufferAccess()
383 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
384 NonLoc LastOffset = svalBuilder in CheckBufferAccess()
385 .evalBinOpNN(state, BO_Sub, *Length, One, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
493 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckOverlap()
556 NonLoc left, in checkAdditionOverflow()
557 NonLoc right) const { in checkAdditionOverflow()
571 NonLoc maxVal = svalBuilder.makeIntVal(maxValInt); in checkAdditionOverflow()
[all …]
DUnixAPIChecker.cpp132 if (!V.getAs<NonLoc>()) { in CheckOpen()
137 NonLoc oflags = V.castAs<NonLoc>(); in CheckOpen()
138 NonLoc ocreateFlag = C.getSValBuilder() in CheckOpen()
139 .makeIntVal(Val_O_CREAT.getValue(), oflagsEx->getType()).castAs<NonLoc>(); in CheckOpen()
DVLASizeChecker.cpp156 NonLoc ArrayLength = in checkPreStmt()
157 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt()
165 state, BO_Mul, ArrayLength, EleSizeVal.castAs<NonLoc>(), SizeTy); in checkPreStmt()
DMallocChecker.cpp708 if (!V.getAs<NonLoc>()) { in performKernelMalloc()
714 NonLoc Flags = V.castAs<NonLoc>(); in performKernelMalloc()
715 NonLoc ZeroFlag = C.getSValBuilder() in performKernelMalloc()
717 .castAs<NonLoc>(); in performKernelMalloc()
/external/clang/lib/StaticAnalyzer/Core/
DSimpleSValBuilder.cpp25 SVal evalCastFromNonLoc(NonLoc val, QualType castTy) override;
34 SVal evalMinus(NonLoc val) override;
35 SVal evalComplement(NonLoc val) override;
37 NonLoc lhs, NonLoc rhs, QualType resultTy) override;
41 Loc lhs, NonLoc rhs, QualType resultTy) override;
63 assert(Val.getAs<Loc>() || Val.getAs<NonLoc>()); in dispatchCast()
65 : evalCastFromNonLoc(Val.castAs<NonLoc>(), CastTy); in dispatchCast()
68 SVal SimpleSValBuilder::evalCastFromNonLoc(NonLoc val, QualType castTy) { in evalCastFromNonLoc()
187 SVal SimpleSValBuilder::evalMinus(NonLoc val) { in evalMinus()
196 SVal SimpleSValBuilder::evalComplement(NonLoc X) { in evalComplement()
[all …]
DSValBuilder.cpp44 NonLoc SValBuilder::makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op, in makeNonLoc()
54 NonLoc SValBuilder::makeNonLoc(const llvm::APSInt& lhs, in makeNonLoc()
62 NonLoc SValBuilder::makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op, in makeNonLoc()
69 NonLoc SValBuilder::makeNonLoc(const SymExpr *operand, in makeNonLoc()
87 return evalCastFromNonLoc(val.castAs<NonLoc>(), ArrayIndexTy); in convertToArrayIndex()
334 NonLoc LHS, NonLoc RHS, in makeSymExprValNN()
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()
DSimpleConstraintManager.h39 ProgramStateRef assume(ProgramStateRef state, NonLoc Cond, bool Assumption);
42 NonLoc Value,
109 NonLoc Cond,
DSimpleConstraintManager.cpp84 return assume(state, Cond.castAs<NonLoc>(), Assumption); in assume()
88 NonLoc cond, in assume()
115 NonLoc Cond, in assumeAux()
194 ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, in assumeWithinInclusiveRange()
DStore.cpp47 NonLoc idx = svalBuilder.makeArrayIndex(index); in MakeElementRegion()
57 NonLoc idx = svalBuilder.makeZeroArrayIndex(); in GetElementZeroRegion()
427 SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, in getLValueElement()
443 Offset = svalBuilder.convertToArrayIndex(Offset).castAs<NonLoc>(); in getLValueElement()
DSVals.cpp247 castAs<NonLoc>().dumpToStream(os); in dumpToStream()
258 void NonLoc::dumpToStream(raw_ostream &os) const { in dumpToStream()
DProgramState.cpp327 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()
DRegionStore.cpp522 NonLoc createLazyBinding(RegionBindingsConstRef B, const TypedValueRegion *R);
1341 NonLoc ZeroIdx = svalBuilder.makeZeroArrayIndex(); in ArrayToPointer()
1765 NonLoc index = ER->getIndex(); in getBindingForFieldOrElementCommon()
1913 NonLoc RegionStoreManager::createLazyBinding(RegionBindingsConstRef B, in createLazyBinding()
2092 const NonLoc &Idx = svalBuilder.makeArrayIndex(i); in bindArray()
2139 NonLoc Idx = svalBuilder.makeArrayIndex(index); in bindVector()
DExprEngineC.cpp876 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()
DExprEngine.cpp191 if (!V.getAs<NonLoc>()) in createTemporaryRegionIfNeeded()
1817 if (Optional<NonLoc> NL = CondV.getAs<NonLoc>()) in processSwitch()
2258 assert(!location.getAs<NonLoc>() && "location cannot be a NonLoc."); in evalLoad()
2428 assert (!X.getAs<NonLoc>()); // Should be an Lval, or unknown, undef. in VisitGCCAsmStmt()
DMemRegion.cpp906 MemRegionManager::getElementRegion(QualType elementType, NonLoc Idx, in getElementRegion()