Home
last modified time | relevance | path

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

12

/external/clang/lib/StaticAnalyzer/Checkers/
DArrayBoundCheckerV2.cpp60 SValBuilder &svalBuilder,
68 static SVal computeExtentBegin(SValBuilder &svalBuilder, in computeExtentBegin() argument
73 return svalBuilder.makeZeroArrayIndex(); in computeExtentBegin()
100 SValBuilder &svalBuilder = checkerContext.getSValBuilder(); in checkLocation() local
102 RegionRawOffsetV2::computeOffset(state, svalBuilder, location); in checkLocation()
111 SVal extentBegin = computeExtentBegin(svalBuilder, rawOffset.getRegion()); in checkLocation()
115 svalBuilder.evalBinOpNN(state, BO_LT, rawOffset.getByteOffset(), *NV, in checkLocation()
116 svalBuilder.getConditionType()); in checkLocation()
141 rawOffset.getRegion()->getExtent(svalBuilder); in checkLocation()
146 = svalBuilder.evalBinOpNN(state, BO_GE, rawOffset.getByteOffset(), in checkLocation()
[all …]
DCStringChecker.cpp222 SValBuilder &svalBuilder = C.getSValBuilder(); in REGISTER_MAP_WITH_PROGRAMSTATE() local
223 DefinedOrUnknownSVal zero = svalBuilder.makeZeroVal(Ty); in REGISTER_MAP_WITH_PROGRAMSTATE()
224 return state->assume(svalBuilder.evalEQ(state, *val, zero)); in REGISTER_MAP_WITH_PROGRAMSTATE()
293 SValBuilder &svalBuilder = C.getSValBuilder(); in CheckLocation() local
295 svalBuilder.convertToArrayIndex(superReg->getExtent(svalBuilder)); in CheckLocation()
357 SValBuilder &svalBuilder = C.getSValBuilder(); in CheckBufferAccess() local
358 ASTContext &Ctx = svalBuilder.getContext(); in CheckBufferAccess()
383 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
384 NonLoc LastOffset = svalBuilder in CheckBufferAccess()
388 SVal BufStart = svalBuilder.evalCast(BufVal, PtrTy, FirstBuf->getType()); in CheckBufferAccess()
[all …]
DBoolAssignmentChecker.cpp80 SValBuilder &svalBuilder = C.getSValBuilder(); in checkBind() local
84 DefinedSVal zeroVal = svalBuilder.makeIntVal(0, valTy); in checkBind()
86 svalBuilder.evalBinOp(state, BO_GE, *DV, zeroVal, in checkBind()
87 svalBuilder.getConditionType()); in checkBind()
120 DefinedSVal OneVal = svalBuilder.makeIntVal(1, valTy); in checkBind()
122 svalBuilder.evalBinOp(state, BO_LE, *DV, OneVal, in checkBind()
123 svalBuilder.getConditionType()); in checkBind()
DVLASizeChecker.cpp135 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local
138 DefinedOrUnknownSVal Zero = svalBuilder.makeZeroVal(Ty); in checkPreStmt()
140 SVal LessThanZeroVal = svalBuilder.evalBinOp(state, BO_LT, sizeD, Zero, Ty); in checkPreStmt()
157 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt()
161 SVal EleSizeVal = svalBuilder.makeIntVal(EleSize.getQuantity(), SizeTy); in checkPreStmt()
164 SVal ArraySizeVal = svalBuilder.evalBinOpNN( in checkPreStmt()
170 state->getRegion(VD, LC)->getExtent(svalBuilder); in checkPreStmt()
173 svalBuilder.evalEQ(state, Extent, ArraySize); in checkPreStmt()
DBuiltinFunctionChecker.cpp70 SValBuilder& svalBuilder = C.getSValBuilder(); in evalCall() local
71 DefinedOrUnknownSVal Extent = R->getExtent(svalBuilder); in evalCall()
73 svalBuilder.evalEQ(state, Extent, Size); in evalCall()
DCastSizeChecker.cpp115 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local
116 SVal extent = SR->getExtent(svalBuilder); in checkPreStmt()
117 const llvm::APSInt *extentInt = svalBuilder.getKnownValue(state, extent); in checkPreStmt()
DMallocChecker.cpp1088 SValBuilder &svalBuilder = C.getSValBuilder(); in MallocMemAux() local
1090 DefinedSVal RetVal = svalBuilder.getConjuredHeapSymbolVal(CE, LCtx, Count) in MallocMemAux()
1104 SValBuilder &svalBuilder = C.getSValBuilder(); in MallocMemAux() local
1105 DefinedOrUnknownSVal Extent = R->getExtent(svalBuilder); in MallocMemAux()
1107 svalBuilder.evalEQ(State, Extent, *DefinedSize); in MallocMemAux()
1901 SValBuilder &svalBuilder = C.getSValBuilder(); in ReallocMem() local
1904 svalBuilder.evalEQ(State, arg0Val, svalBuilder.makeNull()); in ReallocMem()
1919 svalBuilder.evalEQ(State, Arg1Val, in ReallocMem()
1920 svalBuilder.makeIntValWithPtrWidth(0, false)); in ReallocMem()
1997 SValBuilder &svalBuilder = C.getSValBuilder(); in CallocMem() local
[all …]
DStreamChecker.cpp213 SValBuilder &svalBuilder = C.getSValBuilder(); in OpenFileAux() local
215 DefinedSVal RetVal = svalBuilder.conjureSymbolVal(nullptr, CE, LCtx, in OpenFileAux()
DBasicObjCFoundationChecks.cpp580 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local
582 svalBuilder.makeZeroVal(Arg->getType()).castAs<DefinedSVal>(); in checkPreStmt()
585 DefinedOrUnknownSVal ArgIsNull = svalBuilder.evalEQ(state, zero, *DefArgVal); in checkPreStmt()
/external/clang/lib/StaticAnalyzer/Core/
DExprEngineC.cpp50 RightV = svalBuilder.conjureSymbolVal(nullptr, B->getRHS(), LCtx, in VisitBinaryOperator()
74 RightV = svalBuilder.conjureSymbolVal(RHS, LCtx, RHS->getType(), in VisitBinaryOperator()
80 LeftV = svalBuilder.conjureSymbolVal(LHS, LCtx, LHS->getType(), in VisitBinaryOperator()
146 V = svalBuilder.evalCast(V, CLHSTy, LTy); in VisitBinaryOperator()
149 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy), in VisitBinaryOperator()
161 LHSVal = svalBuilder.conjureSymbolVal(nullptr, B->getRHS(), LCtx, LTy, in VisitBinaryOperator()
164 Result = svalBuilder.evalCast(LHSVal, CTy, LTy); in VisitBinaryOperator()
169 LHSVal = svalBuilder.evalCast(Result, LTy, CTy); in VisitBinaryOperator()
194 SVal V = svalBuilder.getBlockPointer(BD, T, in VisitBlockExpr()
347 V = svalBuilder.evalCast(V, T, ExTy); in VisitCast()
[all …]
DStore.cpp25 : svalBuilder(stateMgr.getSValBuilder()), StateMgr(stateMgr), in StoreManager()
26 MRMgr(svalBuilder.getRegionManager()), Ctx(stateMgr.getContext()) {} in StoreManager()
47 NonLoc idx = svalBuilder.makeArrayIndex(index); in MakeElementRegion()
48 return MRMgr.getElementRegion(EleTy, idx, Base, svalBuilder.getContext()); in MakeElementRegion()
57 NonLoc idx = svalBuilder.makeZeroArrayIndex(); in GetElementZeroRegion()
373 ASTContext &Ctx = svalBuilder.getContext(); in CastRetrievedVal()
381 assert(svalBuilder.getContext().hasSameUnqualifiedType(castTy, T)); in CastRetrievedVal()
385 return svalBuilder.dispatchCast(V, castTy); in CastRetrievedVal()
443 Offset = svalBuilder.convertToArrayIndex(Offset).castAs<NonLoc>(); in getLValueElement()
483 nonloc::ConcreteInt NewIdx(svalBuilder.getBasicValueFactory().getValue(BaseIdxI + in getLValueElement()
DRegionStore.cpp649 SValBuilder &svalBuilder; member in __anon1d66978e0611::ClusterAnalysis
670 svalBuilder(StateMgr.getSValBuilder()), in ClusterAnalysis()
901 collectSubRegionBindings(Bindings, svalBuilder, *Cluster, Top, TopKey, in removeSubRegionBindings()
1057 svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, Ctx.IntTy, Count); in VisitCluster()
1078 DefinedOrUnknownSVal V = svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, in VisitCluster()
1151 svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, in VisitCluster()
1157 DefinedOrUnknownSVal V = svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, in VisitCluster()
1196 SVal V = svalBuilder.conjureSymbolVal(/* SymbolTag = */ (const void*) GS, Ex, LCtx, in invalidateGlobalRegion()
1304 SVal Size = cast<SubRegion>(R)->getExtent(svalBuilder); in getSizeInElements()
1305 const llvm::APSInt *SizeInt = svalBuilder.getKnownValue(state, Size); in getSizeInElements()
[all …]
DSVals.cpp195 SVal nonloc::ConcreteInt::evalBinOp(SValBuilder &svalBuilder, in evalBinOp() argument
199 svalBuilder.getBasicValueFactory().evalAPSInt(Op, getValue(), R.getValue()); in evalBinOp()
208 nonloc::ConcreteInt::evalComplement(SValBuilder &svalBuilder) const { in evalComplement()
209 return svalBuilder.makeIntVal(~getValue()); in evalComplement()
213 nonloc::ConcreteInt::evalMinus(SValBuilder &svalBuilder) const { in evalMinus()
214 return svalBuilder.makeIntVal(-getValue()); in evalMinus()
DExprEngineObjC.cpp100 SVal TrueV = svalBuilder.makeTruthVal(1); in VisitObjCForCollectionStmt()
104 SVal FalseV = svalBuilder.makeTruthVal(0); in VisitObjCForCollectionStmt()
117 SVal V = svalBuilder.makeLoc(Sym); in VisitObjCForCollectionStmt()
121 SVal nilV = svalBuilder.makeIntVal(0, T); in VisitObjCForCollectionStmt()
DMemRegion.cpp183 DefinedOrUnknownSVal TypedValueRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent()
184 ASTContext &Ctx = svalBuilder.getContext(); in getExtent()
188 return nonloc::SymbolVal(svalBuilder.getSymbolManager().getExtentSymbol(this)); in getExtent()
193 QualType sizeTy = svalBuilder.getArrayIndexType(); in getExtent()
194 return svalBuilder.makeIntVal(size.getQuantity(), sizeTy); in getExtent()
197 DefinedOrUnknownSVal FieldRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent()
202 DefinedOrUnknownSVal Extent = DeclRegion::getExtent(svalBuilder); in getExtent()
207 QualType T = getDesugaredValueType(svalBuilder.getContext()); in getExtent()
216 DefinedOrUnknownSVal AllocaRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent()
217 return nonloc::SymbolVal(svalBuilder.getSymbolManager().getExtentSymbol(this)); in getExtent()
[all …]
DEnvironment.cpp70 SValBuilder& svalBuilder) const { in getSVal()
95 return svalBuilder.getConstantVal(cast<Expr>(S)).getValue(); in getSVal()
100 return getSVal(EnvironmentEntry(RE, LCtx), svalBuilder); in getSVal()
DExprEngineCXX.cpp302 SVal ZeroVal = svalBuilder.makeZeroVal(getContext().CharTy); in VisitCXXConstructExpr()
455 symVal = svalBuilder.getConjuredHeapSymbolVal(CNE, LCtx, blockCount); in VisitCXXNewExpr()
457 symVal = svalBuilder.conjureSymbolVal(nullptr, CNE, LCtx, CNE->getType(), in VisitCXXNewExpr()
509 Result = svalBuilder.evalCast(PlacementLoc, CNE->getType(), in VisitCXXNewExpr()
548 SVal V = svalBuilder.conjureSymbolVal(CS, LCtx, VD->getType(), in VisitCXXCatchStmt()
564 svalBuilder.getRegionManager().getCXXThisRegion( in VisitCXXThisExpr()
578 const MemRegion *R = svalBuilder.getRegionManager().getCXXTempObjectRegion( in VisitLambdaExpr()
DProgramState.cpp76 svalBuilder(createSimpleSValBuilder(alloc, Ctx, *this)), in ProgramStateManager()
315 SValBuilder &svalBuilder = SM.getSValBuilder(); in assumeInBound() local
316 ASTContext &Ctx = svalBuilder.getContext(); in assumeInBound()
319 BasicValueFactory &BVF = svalBuilder.getBasicValueFactory(); in assumeInBound()
326 SVal newIdx = svalBuilder.evalBinOpNN(this, BO_Add, 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()
DExprEngine.cpp82 svalBuilder(StateMgr.getSValBuilder()), in ExprEngine()
132 svalBuilder.makeZeroVal(T), in getInitialState()
133 svalBuilder.getConditionType()); in getInitialState()
169 loc::MemRegionVal L = svalBuilder.getCXXThis(MD, SFC); in getInitialState()
470 SVal thisVal = State->getSVal(svalBuilder.getCXXThis(decl, stackFrame)); in ProcessInitializer()
849 svalBuilder.makeIntValWithPtrWidth(0, false)); in Visit()
951 Optional<SVal> ConstantVal = svalBuilder.getConstantVal(ArgE); in Visit()
992 SVal result = svalBuilder.conjureSymbolVal(nullptr, Ex, LCtx, in Visit()
1895 svalBuilder.getCXXThis(MD, LocCtxt->getCurrentStackFrame()); in VisitCommonDeclRefExpr()
1920 SVal V = svalBuilder.makeIntVal(ED->getInitVal()); in VisitCommonDeclRefExpr()
[all …]
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DExprEngine.h75 SValBuilder &svalBuilder; variable
131 SValBuilder &getSValBuilder() { return svalBuilder; } in getSValBuilder()
467 return X.isValid() ? svalBuilder.evalMinus(X.castAs<NonLoc>()) : X; in evalMinus()
471 return X.isValid() ? svalBuilder.evalComplement(X.castAs<NonLoc>()) : X; in evalComplement()
478 return svalBuilder.evalBinOpNN(state, op, L, R, T); in evalBinOp()
483 return R.isValid() ? svalBuilder.evalBinOpNN(state, op, L, in evalBinOp()
489 return svalBuilder.evalBinOp(ST, Op, LHS, RHS, T); in evalBinOp()
DProgramState.h465 std::unique_ptr<SValBuilder> svalBuilder; variable
487 ASTContext &getContext() { return svalBuilder->getContext(); } in getContext()
488 const ASTContext &getContext() const { return svalBuilder->getContext(); } in getContext()
491 return svalBuilder->getBasicValueFactory(); in getBasicVals()
495 return *svalBuilder; in getSValBuilder()
499 return svalBuilder->getSymbolManager(); in getSymbolManager()
502 return svalBuilder->getSymbolManager(); in getSymbolManager()
508 return svalBuilder->getRegionManager(); in getRegionManager()
511 return svalBuilder->getRegionManager(); in getRegionManager()
730 *getStateManager().svalBuilder); in getSVal()
DStore.h42 SValBuilder &svalBuilder;
88 return svalBuilder.makeLoc(MRMgr.getVarRegion(VD, LC)); in getLValueVar()
DSVals.h348 SVal evalBinOp(SValBuilder &svalBuilder, BinaryOperator::Opcode Op,
351 ConcreteInt evalComplement(SValBuilder &svalBuilder) const;
353 ConcreteInt evalMinus(SValBuilder &svalBuilder) const;
DMemRegion.h426 virtual DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const { in getExtent() argument
461 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
521 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
725 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
761 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
941 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
DEnvironment.h77 SVal getSVal(const EnvironmentEntry &E, SValBuilder &svalBuilder) const;

12