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.cpp226 SValBuilder &svalBuilder = C.getSValBuilder(); in REGISTER_MAP_WITH_PROGRAMSTATE() local
227 DefinedOrUnknownSVal zero = svalBuilder.makeZeroVal(Ty); in REGISTER_MAP_WITH_PROGRAMSTATE()
228 return state->assume(svalBuilder.evalEQ(state, *val, zero)); in REGISTER_MAP_WITH_PROGRAMSTATE()
297 SValBuilder &svalBuilder = C.getSValBuilder(); in CheckLocation() local
299 svalBuilder.convertToArrayIndex(superReg->getExtent(svalBuilder)); in CheckLocation()
361 SValBuilder &svalBuilder = C.getSValBuilder(); in CheckBufferAccess() local
362 ASTContext &Ctx = svalBuilder.getContext(); in CheckBufferAccess()
387 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess()
388 NonLoc LastOffset = svalBuilder in CheckBufferAccess()
392 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.cpp134 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local
137 DefinedOrUnknownSVal Zero = svalBuilder.makeZeroVal(Ty); in checkPreStmt()
139 SVal LessThanZeroVal = svalBuilder.evalBinOp(state, BO_LT, sizeD, Zero, Ty); in checkPreStmt()
156 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt()
160 SVal EleSizeVal = svalBuilder.makeIntVal(EleSize.getQuantity(), SizeTy); in checkPreStmt()
163 SVal ArraySizeVal = svalBuilder.evalBinOpNN( in checkPreStmt()
169 state->getRegion(VD, LC)->getExtent(svalBuilder); in checkPreStmt()
172 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.cpp112 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local
113 SVal extent = SR->getExtent(svalBuilder); in checkPreStmt()
114 const llvm::APSInt *extentInt = svalBuilder.getKnownValue(state, extent); in checkPreStmt()
DMallocChecker.cpp1096 SValBuilder &svalBuilder = C.getSValBuilder(); in MallocMemAux() local
1098 DefinedSVal RetVal = svalBuilder.getConjuredHeapSymbolVal(CE, LCtx, Count) in MallocMemAux()
1112 SValBuilder &svalBuilder = C.getSValBuilder(); in MallocMemAux() local
1113 DefinedOrUnknownSVal Extent = R->getExtent(svalBuilder); in MallocMemAux()
1115 svalBuilder.evalEQ(State, Extent, *DefinedSize); in MallocMemAux()
1909 SValBuilder &svalBuilder = C.getSValBuilder(); in ReallocMem() local
1912 svalBuilder.evalEQ(State, arg0Val, svalBuilder.makeNull()); in ReallocMem()
1927 svalBuilder.evalEQ(State, Arg1Val, in ReallocMem()
1928 svalBuilder.makeIntValWithPtrWidth(0, false)); in ReallocMem()
2005 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.cpp579 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local
581 svalBuilder.makeZeroVal(Arg->getType()).castAs<DefinedSVal>(); in checkPreStmt()
584 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.cpp651 SValBuilder &svalBuilder; member in __anon53e1adc20611::ClusterAnalysis
672 svalBuilder(StateMgr.getSValBuilder()), B(std::move(b)) {} in ClusterAnalysis()
902 collectSubRegionBindings(Bindings, svalBuilder, *Cluster, Top, TopKey, in removeSubRegionBindings()
1058 svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, Ctx.IntTy, Count); in VisitCluster()
1079 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.cpp179 DefinedOrUnknownSVal TypedValueRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent()
180 ASTContext &Ctx = svalBuilder.getContext(); in getExtent()
184 return nonloc::SymbolVal(svalBuilder.getSymbolManager().getExtentSymbol(this)); in getExtent()
189 QualType sizeTy = svalBuilder.getArrayIndexType(); in getExtent()
190 return svalBuilder.makeIntVal(size.getQuantity(), sizeTy); in getExtent()
193 DefinedOrUnknownSVal FieldRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent()
198 DefinedOrUnknownSVal Extent = DeclRegion::getExtent(svalBuilder); in getExtent()
203 QualType T = getDesugaredValueType(svalBuilder.getContext()); in getExtent()
212 DefinedOrUnknownSVal AllocaRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent()
213 return nonloc::SymbolVal(svalBuilder.getSymbolManager().getExtentSymbol(this)); in getExtent()
[all …]
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()
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()
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.cpp83 svalBuilder(StateMgr.getSValBuilder()), in ExprEngine()
133 svalBuilder.makeZeroVal(T), in getInitialState()
134 svalBuilder.getConditionType()); in getInitialState()
170 loc::MemRegionVal L = svalBuilder.getCXXThis(MD, SFC); in getInitialState()
471 SVal thisVal = State->getSVal(svalBuilder.getCXXThis(decl, stackFrame)); in ProcessInitializer()
860 svalBuilder.makeIntValWithPtrWidth(0, false)); in Visit()
961 Optional<SVal> ConstantVal = svalBuilder.getConstantVal(ArgE); in Visit()
1002 SVal result = svalBuilder.conjureSymbolVal(nullptr, Ex, LCtx, in Visit()
1919 svalBuilder.getCXXThis(MD, LocCtxt->getCurrentStackFrame()); in VisitCommonDeclRefExpr()
1944 SVal V = svalBuilder.makeIntVal(ED->getInitVal()); in VisitCommonDeclRefExpr()
[all …]
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DProgramState.h466 std::unique_ptr<SValBuilder> svalBuilder; variable
488 ASTContext &getContext() { return svalBuilder->getContext(); } in getContext()
489 const ASTContext &getContext() const { return svalBuilder->getContext(); } in getContext()
492 return svalBuilder->getBasicValueFactory(); in getBasicVals()
496 return *svalBuilder; in getSValBuilder()
500 return svalBuilder->getSymbolManager(); in getSymbolManager()
503 return svalBuilder->getSymbolManager(); in getSymbolManager()
509 return svalBuilder->getRegionManager(); in getRegionManager()
512 return svalBuilder->getRegionManager(); in getRegionManager()
731 *getStateManager().svalBuilder); in getSVal()
DExprEngine.h75 SValBuilder &svalBuilder; variable
131 SValBuilder &getSValBuilder() { return svalBuilder; } in getSValBuilder()
478 return X.isValid() ? svalBuilder.evalMinus(X.castAs<NonLoc>()) : X; in evalMinus()
482 return X.isValid() ? svalBuilder.evalComplement(X.castAs<NonLoc>()) : X; in evalComplement()
489 return svalBuilder.evalBinOpNN(state, op, L, R, T); in evalBinOp()
494 return R.isValid() ? svalBuilder.evalBinOpNN(state, op, L, in evalBinOp()
500 return svalBuilder.evalBinOp(ST, Op, LHS, RHS, T); in evalBinOp()
DStore.h42 SValBuilder &svalBuilder;
88 return svalBuilder.makeLoc(MRMgr.getVarRegion(VD, LC)); in getLValueVar()
DSVals.h350 SVal evalBinOp(SValBuilder &svalBuilder, BinaryOperator::Opcode Op,
353 ConcreteInt evalComplement(SValBuilder &svalBuilder) const;
355 ConcreteInt evalMinus(SValBuilder &svalBuilder) const;
DMemRegion.h422 virtual DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const { in getExtent() argument
457 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
517 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
721 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
757 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
937 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
DEnvironment.h78 SVal getSVal(const EnvironmentEntry &E, SValBuilder &svalBuilder) const;

12