Home
last modified time | relevance | path

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

12

/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DSValBuilder.h54 virtual SVal evalCastFromNonLoc(NonLoc val, QualType castTy) = 0;
92 virtual SVal evalMinus(NonLoc val) = 0;
94 virtual SVal evalComplement(NonLoc val) = 0;
99 NonLoc lhs, NonLoc rhs, QualType resultTy) = 0;
110 Loc lhs, NonLoc rhs, QualType resultTy) = 0;
118 NonLoc lhs, NonLoc rhs, QualType resultTy);
217 NonLoc makeCompoundVal(QualType type, llvm::ImmutableList<SVal> vals) { in makeCompoundVal()
221 NonLoc makeLazyCompoundVal(const StoreRef &store, in makeLazyCompoundVal()
227 NonLoc makeZeroArrayIndex() { in makeZeroArrayIndex()
231 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
315 class SymbolVal : public NonLoc {
317 SymbolVal(SymbolRef sym) : NonLoc(SymbolValKind, sym) {} in SymbolVal()
335 static bool isKind(const NonLoc& V) { in isKind()
341 class ConcreteInt : public NonLoc {
343 explicit ConcreteInt(const llvm::APSInt& V) : NonLoc(ConcreteIntKind, &V) {} in ConcreteInt()
365 static bool isKind(const NonLoc& V) { in isKind()
370 class LocAsInteger : public NonLoc {
[all …]
DSVals.def63 ABSTRACT_SVAL_WITH_KIND(NonLoc, DefinedSVal)
64 NONLOC_SVAL(CompoundVal, NonLoc)
65 NONLOC_SVAL(ConcreteInt, NonLoc)
66 NONLOC_SVAL(LazyCompoundVal, NonLoc)
67 NONLOC_SVAL(LocAsInteger, NonLoc)
68 NONLOC_SVAL(SymbolVal, NonLoc)
DExprEngine.h478 return X.isValid() ? svalBuilder.evalMinus(X.castAs<NonLoc>()) : X; in evalMinus()
482 return X.isValid() ? svalBuilder.evalComplement(X.castAs<NonLoc>()) : X; in evalComplement()
488 NonLoc L, NonLoc R, QualType T) { in evalBinOp()
493 NonLoc L, SVal R, QualType T) { in evalBinOp()
495 R.castAs<NonLoc>(), T) : R; in evalBinOp()
DConstraintManager.h103 NonLoc Value,
109 ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, in assumeWithinInclusiveRangeDual()
DProgramState.h669 assert(Val.getAs<NonLoc>() && "Only NonLocs are supported!"); in assumeWithinInclusiveRange()
672 this, Val.castAs<NonLoc>(), From, To, Assumption); in assumeWithinInclusiveRange()
682 assert(Val.getAs<NonLoc>() && "Only NonLocs are supported!"); in assumeWithinInclusiveRange()
685 ->assumeWithinInclusiveRangeDual(this, Val.castAs<NonLoc>(), From, To); in assumeWithinInclusiveRange()
723 if (Optional<NonLoc> N = Idx.getAs<NonLoc>()) in getLValue()
DSValVisitor.h50 case nonloc::Id ## Kind: DISPATCH(NonLoc ## Id, nonloc :: Id); in Visit()
DMemRegion.h1008 NonLoc Index;
1010 ElementRegion(QualType elementType, NonLoc Idx, const MemRegion* sReg) in ElementRegion()
1023 NonLoc getIndex() const { return Index; } in getIndex()
1211 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.cpp199 NonLoc left,
200 NonLoc right) const;
382 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckBufferAccess()
387 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
388 NonLoc LastOffset = svalBuilder in CheckBufferAccess()
389 .evalBinOpNN(state, BO_Sub, *Length, One, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
497 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckOverlap()
560 NonLoc left, in checkAdditionOverflow()
561 NonLoc right) const { in checkAdditionOverflow()
575 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.cpp155 NonLoc ArrayLength = in checkPreStmt()
156 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt()
164 state, BO_Mul, ArrayLength, EleSizeVal.castAs<NonLoc>(), SizeTy); in checkPreStmt()
DMallocChecker.cpp718 if (!V.getAs<NonLoc>()) { in performKernelMalloc()
724 NonLoc Flags = V.castAs<NonLoc>(); in performKernelMalloc()
725 NonLoc ZeroFlag = C.getSValBuilder() in performKernelMalloc()
727 .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()
379 return evalBinOpLN(state, op, *LV, rhs.castAs<NonLoc>(), type); in evalBinOp()
388 return evalBinOpLN(state, op, *RV, lhs.castAs<NonLoc>(), type); in evalBinOp()
391 return evalBinOpNN(state, op, lhs.castAs<NonLoc>(), rhs.castAs<NonLoc>(), in evalBinOp()
449 NonLoc ToTypeMaxVal = in evalIntegralCast()
[all …]
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.cpp524 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.cpp887 state = state->BindExpr(U, LCtx, evalComplement(V.castAs<NonLoc>())); in VisitUnaryOperator()
891 state = state->BindExpr(U, LCtx, evalMinus(V.castAs<NonLoc>())); in VisitUnaryOperator()
908 Result = evalBinOp(state, BO_EQ, V.castAs<NonLoc>(), X, in VisitUnaryOperator()
DExprEngine.cpp192 if (!V.getAs<NonLoc>()) in createTemporaryRegionIfNeeded()
1841 if (Optional<NonLoc> NL = CondV.getAs<NonLoc>()) in processSwitch()
2320 assert(!location.getAs<NonLoc>() && "location cannot be a NonLoc."); in evalLoad()
2490 assert (!X.getAs<NonLoc>()); // Should be an Lval, or unknown, undef. in VisitGCCAsmStmt()
/external/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/
DMPIChecker.cpp170 const NonLoc Idx = Ctx.getSValBuilder().makeArrayIndex(i); in allRegionsUsedByWait()

12