Home
last modified time | relevance | path

Searched refs:SVal (Results 1 – 25 of 80) sorted by relevance

1234

/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DSVals.h44 class SVal {
63 explicit SVal(const void *d, bool isLoc, unsigned ValKind) in SVal() function
66 explicit SVal(BaseKind k, const void *D = NULL)
70 explicit SVal() : Data(0), Kind(0) {} in SVal() function
71 ~SVal() {} in ~SVal()
74 typedef SmallVector<SVal,5> BufferTy;
87 inline bool operator==(const SVal& R) const {
91 inline bool operator!=(const SVal& R) const {
160 static inline bool classof(const SVal*) { return true; } in classof() argument
164 class UndefinedVal : public SVal {
[all …]
DStore.h58 virtual SVal getBinding(Store store, Loc loc, QualType T = QualType()) = 0;
67 virtual StoreRef Bind(Store store, Loc loc, SVal val) = 0;
69 virtual StoreRef BindDefault(Store store, const MemRegion *R, SVal V);
78 const LocationContext *LC, SVal v) = 0;
102 virtual SVal getLValueIvar(const ObjCIvarDecl *decl, SVal base);
104 virtual SVal getLValueField(const FieldDecl *D, SVal Base) { in getLValueField()
108 virtual SVal getLValueElement(QualType elementType, NonLoc offset, SVal Base);
120 virtual SVal ArrayToPointer(Loc Array) = 0;
123 virtual SVal evalDerivedToBase(SVal derived, QualType basePtrType) = 0;
133 virtual SVal evalDynamicCast(SVal base, QualType derivedPtrType,
[all …]
DProgramState.h191 SVal V) const;
196 SVal V, bool Invalidate = true) const;
202 SVal location, SVal V) const;
204 ProgramStateRef bindDecl(const VarRegion *VR, SVal V) const;
208 ProgramStateRef bindLoc(Loc location, SVal V) const;
210 ProgramStateRef bindLoc(SVal location, SVal V) const;
212 ProgramStateRef bindDefault(SVal loc, SVal V) const;
237 SVal getLValue(const ObjCIvarDecl *decl, SVal base) const;
240 SVal getLValue(const FieldDecl *decl, SVal Base) const;
243 SVal getLValue(QualType ElementType, SVal Idx, SVal Base) const;
[all …]
DBasicValueFactory.h27 llvm::ImmutableList<SVal> L;
30 CompoundValData(QualType t, llvm::ImmutableList<SVal> l) in CompoundValData()
33 typedef llvm::ImmutableList<SVal>::iterator iterator;
38 llvm::ImmutableList<SVal> L);
71 llvm::ImmutableList<SVal>::Factory SValListFactory;
169 llvm::ImmutableList<SVal> Vals);
174 llvm::ImmutableList<SVal> getEmptySValList() { in getEmptySValList()
178 llvm::ImmutableList<SVal> consVals(SVal X, llvm::ImmutableList<SVal> L) { in consVals()
186 const std::pair<SVal, uintptr_t>&
187 getPersistentSValWithData(const SVal& V, uintptr_t Data);
[all …]
DSValBuilder.h53 virtual SVal evalCastFromNonLoc(NonLoc val, QualType castTy) = 0;
54 virtual SVal evalCastFromLoc(Loc val, QualType castTy) = 0;
59 virtual SVal dispatchCast(SVal val, QualType castTy) = 0;
84 SVal evalCast(SVal val, QualType castTy, QualType originalType);
86 virtual SVal evalMinus(NonLoc val) = 0;
88 virtual SVal evalComplement(NonLoc val) = 0;
92 virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op,
97 virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op,
103 virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op,
108 virtual const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal val) = 0;
[all …]
DExprEngine.h210 ProgramStateRef processAssume(ProgramStateRef state, SVal cond,bool assumption);
393 SVal evalMinus(SVal X) { in evalMinus()
397 SVal evalComplement(SVal X) { in evalComplement()
403 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp()
408 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp()
409 NonLoc L, SVal R, QualType T) { in evalBinOp()
413 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op, in evalBinOp()
414 SVal LHS, SVal RHS, QualType T) { in evalBinOp()
435 SVal location, SVal Val, bool atDeclInit = false);
449 SVal location,
[all …]
DEnvironment.h62 typedef llvm::ImmutableMap<EnvironmentEntry, SVal> BindingsTy;
70 SVal lookupExpr(const EnvironmentEntry &E) const;
79 SVal getSVal(const EnvironmentEntry &E,
120 Environment bindExpr(Environment Env, const EnvironmentEntry &E, SVal V,
127 SVal location,
128 SVal V);
/external/clang/lib/StaticAnalyzer/Checkers/
DArrayBoundCheckerV2.cpp39 void checkLocation(SVal l, bool isLoad, const Stmt*S,
47 SVal byteOffset;
53 RegionRawOffsetV2(const SubRegion* base, SVal offset) in RegionRawOffsetV2()
61 SVal location);
68 static SVal computeExtentBegin(SValBuilder &svalBuilder, in computeExtentBegin()
84 void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, in checkLocation()
111 SVal extentBegin = computeExtentBegin(svalBuilder, rawOffset.getRegion()); in checkLocation()
114 SVal lowerBound in checkLocation()
146 SVal upperbound in checkLocation()
237 static inline SVal getValue(SVal val, SValBuilder &svalBuilder) { in getValue()
[all …]
DCStringChecker.cpp118 ProgramStateRef state, SVal V, QualType Ty);
122 SVal strLength);
123 static SVal getCStringLengthForRegion(CheckerContext &C,
128 SVal getCStringLength(CheckerContext &C,
131 SVal Buf,
137 SVal val) const;
141 const Expr *Ex, SVal V);
150 SVal l) const;
154 SVal l,
193 typedef llvm::ImmutableMap<const MemRegion *, SVal> EntryMap;
[all …]
DObjCSelfInitChecker.cpp54 static bool isSelfVar(SVal location, CheckerContext &C);
71 void checkLocation(SVal location, bool isLoad, const Stmt *S,
128 static SelfFlagEnum getSelfFlags(SVal val, ProgramStateRef state) { in getSelfFlags()
135 static SelfFlagEnum getSelfFlags(SVal val, CheckerContext &C) { in getSelfFlags()
139 static void addSelfFlag(ProgramStateRef state, SVal val, in addSelfFlag()
146 static bool hasSelfFlag(SVal val, SelfFlagEnum flag, CheckerContext &C) { in hasSelfFlag()
154 SVal exprVal = C.getState()->getSVal(E, C.getLocationContext()); in isInvalidSelf()
204 SVal V = state->getSVal(msg.getMessageExpr(), C.getLocationContext()); in checkPostObjCMessage()
286 SVal argV = CE.getArgSVal(i); in checkPreStmt()
304 SVal argV = CE.getArgSVal(i); in checkPostStmt()
[all …]
DBoolAssignmentChecker.cpp29 void checkBind(SVal loc, SVal val, const Stmt *S, CheckerContext &C) const;
54 void BoolAssignmentChecker::checkBind(SVal loc, SVal val, const Stmt *S, in checkBind()
85 SVal greaterThanOrEqualToZeroVal = in checkBind()
121 SVal lessThanEqToOneVal = in checkBind()
DOSAtomicChecker.cpp42 SVal L = State->getSVal(Callee, LCtx); in getCalleeName()
110 SVal location = state->getSVal(theValueExpr, LCtx); in evalOSAtomicCompareAndSwap()
141 SVal theValueVal_untested = stateLoad->getSVal(theValueExpr, LCtx, true); in evalOSAtomicCompareAndSwap()
143 SVal oldValueVal_untested = stateLoad->getSVal(oldValueExpr, LCtx); in evalOSAtomicCompareAndSwap()
167 SVal val = stateEqual->getSVal(newValueExpr, LCtx); in evalOSAtomicCompareAndSwap()
191 SVal Res = UnknownVal(); in evalOSAtomicCompareAndSwap()
203 SVal Res = UnknownVal(); in evalOSAtomicCompareAndSwap()
DUndefinedAssignmentChecker.cpp30 void checkBind(SVal location, SVal val, const Stmt *S,
35 void UndefinedAssignmentChecker::checkBind(SVal location, SVal val, in checkBind()
/external/llvm/test/CodeGen/X86/
D2010-08-04-StackVariable.ll4 %struct.SVal = type { i8*, i32 }
6 define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) nounwind ssp {
10 call void @llvm.dbg.value(metadata !{%struct.SVal* %location}, i64 0, metadata !25), !dbg !24
15 %1 = getelementptr inbounds %struct.SVal* %location, i32 0, i32 1, !dbg !29 ; <i32*> [#uses=1]
21 %4 = getelementptr inbounds %struct.SVal* %location, i32 0, i32 1, !dbg !30 ; <i32*> [#uses=1]
34 define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 {
37 call void @llvm.dbg.value(metadata !{%struct.SVal* %this}, i64 0, metadata !31), !dbg !34
38 %0 = getelementptr inbounds %struct.SVal* %this, i32 0, i32 0, !dbg !34 ; <i8**> [#uses=1]
40 %1 = getelementptr inbounds %struct.SVal* %this, i32 0, i32 1, !dbg !34 ; <i32*> [#uses=1]
52 %0 = alloca %struct.SVal ; <%struct.SVal*> [#uses=3]
[all …]
/external/llvm/test/CodeGen/ARM/
D2010-08-04-StackVariable.ll4 %struct.SVal = type { i8*, i32 }
6 define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) nounwind ssp {
10 call void @llvm.dbg.value(metadata !{%struct.SVal* %location}, i64 0, metadata !25), !dbg !24
15 %1 = getelementptr inbounds %struct.SVal* %location, i32 0, i32 1, !dbg !29 ; <i32*> [#uses=1]
21 %4 = getelementptr inbounds %struct.SVal* %location, i32 0, i32 1, !dbg !30 ; <i32*> [#uses=1]
34 define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 {
37 call void @llvm.dbg.value(metadata !{%struct.SVal* %this}, i64 0, metadata !31), !dbg !34
38 %0 = getelementptr inbounds %struct.SVal* %this, i32 0, i32 0, !dbg !34 ; <i8**> [#uses=1]
40 %1 = getelementptr inbounds %struct.SVal* %this, i32 0, i32 1, !dbg !34 ; <i32*> [#uses=1]
52 %0 = alloca %struct.SVal ; <%struct.SVal*> [#uses=3]
[all …]
/external/clang/lib/StaticAnalyzer/Core/
DRegionStore.cpp110 typedef llvm::ImmutableMap<BindingKey, SVal> RegionBindings;
211 Optional<SVal> getDirectBinding(RegionBindings B, const MemRegion *R);
214 Optional<SVal> getDefaultBinding(RegionBindings B, const MemRegion *R);
227 SVal ArrayToPointer(Loc Array);
230 virtual SVal evalDerivedToBase(SVal derived, QualType basePtrType);
240 virtual SVal evalDynamicCast(SVal base, QualType derivedPtrType,bool &Failed);
268 RegionBindings addBinding(RegionBindings B, BindingKey K, SVal V);
271 BindingKey::Kind k, SVal V);
273 const SVal *lookup(RegionBindings B, BindingKey K);
274 const SVal *lookup(RegionBindings B, const MemRegion *R, BindingKey::Kind k);
[all …]
DSVals.cpp31 bool SVal::hasConjuredSymbol() const { in hasConjuredSymbol()
50 const FunctionDecl *SVal::getAsFunctionDecl() const { in getAsFunctionDecl()
65 SymbolRef SVal::getAsLocSymbol() const { in getAsLocSymbol()
79 SymbolRef SVal::getLocSymbolInBase() const { in getLocSymbolInBase()
101 SymbolRef SVal::getAsSymbol() const { in getAsSymbol()
111 const SymExpr *SVal::getAsSymbolicExpression() const { in getAsSymbolicExpression()
118 const SymExpr* SVal::getAsSymExpr() const { in getAsSymExpr()
125 const MemRegion *SVal::getAsRegion() const { in getAsRegion()
165 bool SVal::isConstant() const { in isConstant()
169 bool SVal::isConstant(int I) const { in isConstant()
[all …]
DBasicValueFactory.cpp23 llvm::ImmutableList<SVal> L) { in Profile()
35 typedef std::pair<SVal, uintptr_t> SValData;
36 typedef std::pair<SVal, SVal> SValPair;
112 llvm::ImmutableList<SVal> Vals) { in getCompoundValData()
239 const std::pair<SVal, uintptr_t>&
240 BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) { in getPersistentSValWithData()
264 const std::pair<SVal, SVal>&
265 BasicValueFactory::getPersistentSValPair(const SVal& V1, const SVal& V2) { in getPersistentSValPair()
289 const SVal* BasicValueFactory::getPersistentSVal(SVal X) { in getPersistentSVal()
DEnvironment.cpp23 SVal Environment::lookupExpr(const EnvironmentEntry &E) const { in lookupExpr()
24 const SVal* X = ExprBindings.lookup(E); in lookupExpr()
26 SVal V = *X; in lookupExpr()
32 SVal Environment::getSVal(const EnvironmentEntry &Entry, in getSVal()
68 const SVal *X = ExprBindings.lookup(EnvironmentEntry(E, LCtx)); in getSVal()
76 SVal const *X = ExprBindings.lookup(EnvironmentEntry(E, LCtx)); in getSVal()
126 SVal V, in bindExpr()
145 SVal location, SVal V) { in bindExprAndLocation()
191 SmallVector<std::pair<EnvironmentEntry, SVal>, 10> deferredLocations; in removeDeadBindings()
196 llvm::ImmutableMapRef<EnvironmentEntry,SVal> in removeDeadBindings()
[all …]
DSimpleSValBuilder.cpp23 virtual SVal dispatchCast(SVal val, QualType castTy);
24 virtual SVal evalCastFromNonLoc(NonLoc val, QualType castTy);
25 virtual SVal evalCastFromLoc(Loc val, QualType castTy);
33 virtual SVal evalMinus(NonLoc val);
34 virtual SVal evalComplement(NonLoc val);
35 virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op,
37 virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op,
39 virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op,
44 virtual const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal V);
46 SVal MakeSymIntVal(const SymExpr *LHS, BinaryOperator::Opcode op,
[all …]
DStore.cpp49 StoreRef StoreManager::BindDefault(Store store, const MemRegion *R, SVal V) { in BindDefault()
217 SVal StoreManager::CastRetrievedVal(SVal V, const TypedValueRegion *R, in CastRetrievedVal()
238 SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) { in getLValueFieldOrIvar()
273 SVal StoreManager::getLValueIvar(const ObjCIvarDecl *decl, SVal base) { in getLValueIvar()
277 SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, in getLValueElement()
278 SVal Base) { in getLValueElement()
309 SVal BaseIdx = ElemR->getIndex(); in getLValueElement()
346 SVal val) { in HandleBinding()
DExprEngineC.cpp39 SVal LeftV = state->getSVal(LHS, LCtx); in VisitBinaryOperator()
40 SVal RightV = state->getSVal(RHS, LCtx); in VisitBinaryOperator()
53 SVal ExprVal = B->isLValue() ? LeftV : RightV; in VisitBinaryOperator()
63 SVal Result = evalBinOp(state, Op, LeftV, RightV, B->getType()); in VisitBinaryOperator()
94 SVal location = LeftV; in VisitBinaryOperator()
102 SVal V = state->getSVal(LHS, LCtx); in VisitBinaryOperator()
119 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy), in VisitBinaryOperator()
125 SVal LHSVal; in VisitBinaryOperator()
165 SVal V = svalBuilder.getBlockPointer(BE->getBlockDecl(), T, in VisitBlockExpr()
233 SVal V = state->getSVal(Ex, LCtx); in VisitCast()
[all …]
DProgramState.cpp116 SVal V) const { in bindCompoundLiteral()
122 ProgramStateRef ProgramState::bindDecl(const VarRegion* VR, SVal IVal) const { in bindDecl()
134 ProgramStateRef ProgramState::bindLoc(Loc LV, SVal V) const { in bindLoc()
145 ProgramStateRef ProgramState::bindDefault(SVal loc, SVal V) const { in bindDefault()
213 SVal ProgramState::getSValAsScalarOrLoc(const MemRegion *R) const { in getSValAsScalarOrLoc()
229 SVal ProgramState::getSVal(Loc location, QualType T) const { in getSVal()
230 SVal V = getRawSVal(cast<Loc>(location), T); in getSVal()
268 SVal V, bool Invalidate) const{ in BindExpr()
282 SVal location, in bindExprAndLocation()
283 SVal V) const { in bindExprAndLocation()
[all …]
DExprEngineObjC.cpp27 SVal baseVal = state->getSVal(Ex->getBase(), LCtx); in VisitLvalObjCIvarRefExpr()
28 SVal location = state->getLValue(Ex->getDecl(), baseVal); in VisitLvalObjCIvarRefExpr()
76 SVal elementV; in VisitObjCForCollectionStmt()
100 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()
152 SVal recVal = state->getSVal(Receiver, Pred->getLocationContext()); in VisitObjCMessage()
235 SVal ReturnValue = UnknownVal(); in evalObjCMessage()
DObjCMessage.cpp47 SVal CallOrObjCMessage::getFunctionCallee() const { in getFunctionCallee()
54 SVal CallOrObjCMessage::getCXXCallee() const { in getCXXCallee()
68 SVal
85 SVal CalleeVal = getFunctionCallee(); in getDecl()

1234