Home
last modified time | relevance | path

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

1234

/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DSVals.h46 class SVal {
63 explicit SVal(const void *d, bool isLoc, unsigned ValKind) in SVal() function
66 explicit SVal(BaseKind k, const void *D = nullptr)
70 explicit SVal() : Data(nullptr), Kind(0) {} in SVal() function
78 SVal& sv = t; in castAs()
90 SVal& sv = t; in getAs()
96 typedef SmallVector<SVal,5> BufferTy;
109 inline bool operator==(const SVal& R) const {
113 inline bool operator!=(const SVal& R) const {
191 class UndefinedVal : public SVal {
[all …]
DStore.h61 virtual SVal getBinding(Store store, Loc loc, QualType T = QualType()) = 0;
70 virtual StoreRef Bind(Store store, Loc loc, SVal val) = 0;
72 virtual StoreRef BindDefault(Store store, const MemRegion *R, SVal V);
96 virtual SVal getLValueIvar(const ObjCIvarDecl *decl, SVal base);
98 virtual SVal getLValueField(const FieldDecl *D, SVal Base) { in getLValueField()
102 virtual SVal getLValueElement(QualType elementType, NonLoc offset, SVal Base);
114 virtual SVal ArrayToPointer(Loc Array, QualType ElementTy) = 0;
118 SVal evalDerivedToBase(SVal Derived, const CastExpr *Cast);
121 SVal evalDerivedToBase(SVal Derived, const CXXBasePath &CastPath);
124 SVal evalDerivedToBase(SVal Derived, QualType DerivedPtrType,
[all …]
DProgramState.h218 ConditionTruthVal isNull(SVal V) const;
230 SVal V, bool Invalidate = true) const;
233 SVal V,
236 ProgramStateRef bindLoc(SVal location, SVal V) const;
238 ProgramStateRef bindDefault(SVal loc, SVal V) const;
268 invalidateRegions(ArrayRef<SVal> Regions, const Expr *E,
286 SVal getLValue(const ObjCIvarDecl *decl, SVal base) const;
289 SVal getLValue(const FieldDecl *decl, SVal Base) const;
292 SVal getLValue(const IndirectFieldDecl *decl, SVal Base) const;
295 SVal getLValue(QualType ElementType, SVal Idx, SVal Base) const;
[all …]
DBasicValueFactory.h29 llvm::ImmutableList<SVal> L;
32 CompoundValData(QualType t, llvm::ImmutableList<SVal> l) in CompoundValData()
35 typedef llvm::ImmutableList<SVal>::iterator iterator;
40 llvm::ImmutableList<SVal> L);
73 llvm::ImmutableList<SVal>::Factory SValListFactory;
170 llvm::ImmutableList<SVal> Vals);
175 llvm::ImmutableList<SVal> getEmptySValList() { in getEmptySValList()
179 llvm::ImmutableList<SVal> consVals(SVal X, llvm::ImmutableList<SVal> L) { in consVals()
187 const std::pair<SVal, uintptr_t>&
188 getPersistentSValWithData(const SVal& V, uintptr_t Data);
[all …]
DSValBuilder.h54 virtual SVal evalCastFromNonLoc(NonLoc val, QualType castTy) = 0;
55 virtual SVal evalCastFromLoc(Loc val, QualType castTy) = 0;
60 virtual SVal dispatchCast(SVal val, QualType castTy) = 0;
86 SVal evalCast(SVal val, QualType castTy, QualType originalType);
89 SVal evalIntegralCast(ProgramStateRef state, SVal val, QualType castTy,
92 virtual SVal evalMinus(NonLoc val) = 0;
94 virtual SVal evalComplement(NonLoc val) = 0;
98 virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op,
103 virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op,
109 virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op,
[all …]
DExprEngine.h285 ProgramStateRef processAssume(ProgramStateRef state, SVal cond,
477 SVal evalMinus(SVal X) { in evalMinus()
481 SVal evalComplement(SVal X) { in evalComplement()
487 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp()
492 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp()
493 NonLoc L, SVal R, QualType T) { in evalBinOp()
498 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op, in evalBinOp()
499 SVal LHS, SVal RHS, QualType T) { in evalBinOp()
507 SVal location, SVal Val, bool atDeclInit = false,
512 SVal Loc, SVal Val) override;
[all …]
DSVals.def1 //===-- SVals.def - Metadata about SVal kinds -------------------*- C++ -*-===//
10 // The list of symbolic values (SVal kinds and sub-kinds) used in the Static
11 // Analyzer. The distinction between loc:: and nonloc:: SVal namespaces is
16 // BASIC_SVAL(Id, Parent) - for specific SVal sub-kinds, which are
20 // ABSTRACT_SVAL(Id, Parent) - for abstract SVal classes which are
23 // ABSTRACT_SVAL_WITH_KIND(Id, Parent) - for SVal classes which are also
55 BASIC_SVAL(UndefinedVal, SVal)
56 ABSTRACT_SVAL(DefinedOrUnknownSVal, SVal)
/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 !dbg !17 {
10 …call void @llvm.dbg.value(metadata %struct.SVal* %location, i64 0, metadata !25, metadata !DIExpre…
15 …%1 = getelementptr inbounds %struct.SVal, %struct.SVal* %location, i32 0, i32 1, !dbg !29 ; <i32*>…
21 …%4 = getelementptr inbounds %struct.SVal, %struct.SVal* %location, i32 0, i32 1, !dbg !30 ; <i32*>…
34 define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 !dbg !16 {
37 …call void @llvm.dbg.value(metadata %struct.SVal* %this, i64 0, metadata !31, metadata !DIExpressio…
38 …%0 = getelementptr inbounds %struct.SVal, %struct.SVal* %this, i32 0, i32 0, !dbg !34 ; <i8**> [#u…
40 …%1 = getelementptr inbounds %struct.SVal, %struct.SVal* %this, i32 0, i32 1, !dbg !34 ; <i32*> [#u…
52 %0 = alloca %struct.SVal ; <%struct.SVal*> [#uses=3]
[all …]
/external/llvm/test/CodeGen/ARM/
D2010-08-04-StackVariable.ll7 %struct.SVal = type { i8*, i32 }
9 define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) nounwind ssp !dbg !17 {
13 …call void @llvm.dbg.value(metadata %struct.SVal* %location, i64 0, metadata !25, metadata !DIExpre…
18 …%1 = getelementptr inbounds %struct.SVal, %struct.SVal* %location, i32 0, i32 1, !dbg !29 ; <i32*>…
24 …%4 = getelementptr inbounds %struct.SVal, %struct.SVal* %location, i32 0, i32 1, !dbg !30 ; <i32*>…
37 define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 !dbg !16 {
40 …call void @llvm.dbg.value(metadata %struct.SVal* %this, i64 0, metadata !31, metadata !DIExpressio…
41 …%0 = getelementptr inbounds %struct.SVal, %struct.SVal* %this, i32 0, i32 0, !dbg !34 ; <i8**> [#u…
43 …%1 = getelementptr inbounds %struct.SVal, %struct.SVal* %this, i32 0, i32 1, !dbg !34 ; <i32*> [#u…
55 %0 = alloca %struct.SVal ; <%struct.SVal*> [#uses=3]
[all …]
/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()
145 SVal upperbound in checkLocation()
226 static inline SVal getValue(SVal val, SValBuilder &svalBuilder) { in getValue()
[all …]
DCStringChecker.cpp128 ProgramStateRef state, SVal V, QualType Ty);
132 SVal strLength);
133 static SVal getCStringLengthForRegion(CheckerContext &C,
138 SVal getCStringLength(CheckerContext &C,
141 SVal Buf,
147 SVal val) const;
151 const Expr *Ex, SVal V,
162 SVal l) const;
166 SVal l,
213 REGISTER_MAP_WITH_PROGRAMSTATE(CStringLength, const MemRegion *, SVal) in REGISTER_MAP_WITH_PROGRAMSTATE() argument
[all …]
DObjCSelfInitChecker.cpp55 static bool isSelfVar(SVal location, CheckerContext &C);
75 void checkLocation(SVal location, bool isLoad, const Stmt *S,
77 void checkBind(SVal loc, SVal val, const Stmt *S, CheckerContext &C) const;
107 static SelfFlagEnum getSelfFlags(SVal val, ProgramStateRef state) { in REGISTER_MAP_WITH_PROGRAMSTATE()
114 static SelfFlagEnum getSelfFlags(SVal val, CheckerContext &C) { in getSelfFlags()
118 static void addSelfFlag(ProgramStateRef state, SVal val, in addSelfFlag()
127 static bool hasSelfFlag(SVal val, SelfFlagEnum flag, CheckerContext &C) { in hasSelfFlag()
135 SVal exprVal = C.getState()->getSVal(E, C.getLocationContext()); in isInvalidSelf()
186 SVal V = state->getSVal(Msg.getOriginExpr(), C.getLocationContext()); in checkPostObjCMessage()
253 SVal argV = CE.getArgSVal(i); in checkPreCall()
[all …]
DTestAfterDivZeroChecker.cpp83 void reportBug(SVal Val, CheckerContext &C) const;
89 void setDivZeroMap(SVal Var, CheckerContext &C) const;
90 bool hasDivZeroMap(SVal Var, const CheckerContext &C) const;
91 bool isZero(SVal S, CheckerContext &C) const;
119 SVal S = State->getSVal(E, Succ->getLocationContext()); in REGISTER_SET_WITH_PROGRAMSTATE()
138 bool TestAfterDivZeroChecker::isZero(SVal S, CheckerContext &C) const { in isZero()
148 void TestAfterDivZeroChecker::setDivZeroMap(SVal Var, CheckerContext &C) const { in setDivZeroMap()
159 bool TestAfterDivZeroChecker::hasDivZeroMap(SVal Var, in hasDivZeroMap()
169 void TestAfterDivZeroChecker::reportBug(SVal Val, CheckerContext &C) const { in reportBug()
208 SVal S = C.getSVal(B->getRHS()); in checkPreStmt()
[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()
/external/swiftshader/third_party/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/swiftshader/third_party/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/clang/lib/StaticAnalyzer/Core/
DStore.cpp51 StoreRef StoreManager::BindDefault(Store store, const MemRegion *R, SVal V) { in BindDefault()
215 static bool regionMatchesCXXRecordType(SVal V, QualType Ty) { in regionMatchesCXXRecordType()
235 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) { in evalDerivedToBase()
242 SVal Result = Derived; in evalDerivedToBase()
251 SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) { in evalDerivedToBase()
253 SVal Result = Derived; in evalDerivedToBase()
262 SVal StoreManager::evalDerivedToBase(SVal Derived, QualType BaseType, in evalDerivedToBase()
295 SVal StoreManager::evalDynamicCast(SVal Base, QualType TargetType, in evalDynamicCast()
367 SVal StoreManager::CastRetrievedVal(SVal V, const TypedValueRegion *R, in CastRetrievedVal()
388 SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) { in getLValueFieldOrIvar()
[all …]
DRegionStore.cpp144 typedef llvm::ImmutableMap<BindingKey, SVal> ClusterBindings;
145 typedef llvm::ImmutableMapRef<BindingKey, SVal> ClusterBindingsRef;
146 typedef std::pair<BindingKey, SVal> BindingPair;
180 RegionBindingsRef addBinding(BindingKey K, SVal V) const;
183 BindingKey::Kind k, SVal V) const;
185 const SVal *lookup(BindingKey K) const;
186 const SVal *lookup(const MemRegion *R, BindingKey::Kind k) const;
199 Optional<SVal> getDirectBinding(const MemRegion *R) const;
203 Optional<SVal> getDefaultBinding(const MemRegion *R) const;
227 Optional<SVal> RegionBindingsRef::getDirectBinding(const MemRegion *R) const { in getDirectBinding()
[all …]
DSVals.cpp32 bool SVal::hasConjuredSymbol() const { in hasConjuredSymbol()
51 const FunctionDecl *SVal::getAsFunctionDecl() const { in getAsFunctionDecl()
69 SymbolRef SVal::getAsLocSymbol(bool IncludeBaseRegions) const { in getAsLocSymbol()
85 SymbolRef SVal::getLocSymbolInBase() const { in getLocSymbolInBase()
111 SymbolRef SVal::getAsSymbol(bool IncludeBaseRegion) const { in getAsSymbol()
121 const SymExpr *SVal::getAsSymbolicExpression() const { in getAsSymbolicExpression()
128 const SymExpr* SVal::getAsSymExpr() const { in getAsSymExpr()
135 const MemRegion *SVal::getAsRegion() const { in getAsRegion()
174 bool SVal::isConstant() const { in isConstant()
178 bool SVal::isConstant(int I) const { in isConstant()
[all …]
DBasicValueFactory.cpp24 llvm::ImmutableList<SVal> L) { in Profile()
36 typedef std::pair<SVal, uintptr_t> SValData;
37 typedef std::pair<SVal, SVal> SValPair;
109 llvm::ImmutableList<SVal> Vals) { in getCompoundValData()
240 const std::pair<SVal, uintptr_t>&
241 BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) { in getPersistentSValWithData()
265 const std::pair<SVal, SVal>&
266 BasicValueFactory::getPersistentSValPair(const SVal& V1, const SVal& V2) { in getPersistentSValPair()
290 const SVal* BasicValueFactory::getPersistentSVal(SVal X) { in getPersistentSVal()
DSimpleSValBuilder.cpp24 SVal dispatchCast(SVal val, QualType castTy) override;
25 SVal evalCastFromNonLoc(NonLoc val, QualType castTy) override;
26 SVal evalCastFromLoc(Loc val, QualType castTy) override;
34 SVal evalMinus(NonLoc val) override;
35 SVal evalComplement(NonLoc val) override;
36 SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op,
38 SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op,
40 SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op,
45 const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal V) override;
47 SVal MakeSymIntVal(const SymExpr *LHS, BinaryOperator::Opcode op,
[all …]
DExprEngineC.cpp40 SVal LeftV = state->getSVal(LHS, LCtx); in VisitBinaryOperator()
41 SVal RightV = state->getSVal(RHS, LCtx); in VisitBinaryOperator()
55 SVal ExprVal = B->isGLValue() ? LeftV : RightV; in VisitBinaryOperator()
93 SVal Result = evalBinOp(state, Op, LeftV, RightV, B->getType()); in VisitBinaryOperator()
124 SVal location = LeftV; in VisitBinaryOperator()
132 SVal V = state->getSVal(LHS, LCtx); in VisitBinaryOperator()
149 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy), in VisitBinaryOperator()
155 SVal LHSVal; in VisitBinaryOperator()
194 SVal V = svalBuilder.getBlockPointer(BD, T, in VisitBlockExpr()
228 SVal originalV; in VisitBlockExpr()
[all …]
DExprEngineCXX.cpp41 SVal ThisVal; in performTrivialCopy()
61 SVal V = Call.getArgSVal(0); in performTrivialCopy()
92 static SVal makeZeroElementRegion(ProgramStateRef State, SVal LValue, in makeZeroElementRegion()
120 SVal LValue = State->getLValue(Var, LCtx); in getRegionForConstructedObject()
132 SVal ThisVal = State->getSVal(ThisPtr); in getRegionForConstructedObject()
135 SVal FieldVal; in getRegionForConstructedObject()
274 SVal ThisVal = State->getSVal(ThisPtr); in VisitCXXConstructExpr()
282 SVal BaseVal = getStoreManager().evalDerivedToBase(ThisVal, CE->getType(), in VisitCXXConstructExpr()
302 SVal ZeroVal = svalBuilder.makeZeroVal(getContext().CharTy); in VisitCXXConstructExpr()
367 SVal DestVal = UnknownVal(); in VisitCXXDestructor()
[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()
172 SVal recVal = Msg->getReceiverSVal(); in VisitObjCMessage()
231 SVal recVal = UpdatedMsg->getReceiverSVal(); in VisitObjCMessage()
/external/llvm/test/DebugInfo/X86/
Dreference-argument.ll23 %class.SVal = type { i8*, i32 }
26 declare void @_Z3barR4SVal(%class.SVal* %v)
31 define linkonce_odr void @_ZN1A3fooE4SVal(%class.A* %this, %class.SVal* %v) nounwind ssp uwtable al…
36 …call void @llvm.dbg.value(metadata %class.SVal* %v, i64 0, metadata !62, metadata !DIExpression(DW…
38 call void @_Z3barR4SVal(%class.SVal* %v), !dbg !61
41 declare void @_ZN4SValD1Ev(%class.SVal* %this)
42 declare void @_ZN4SValD2Ev(%class.SVal* %this)
55 !9 = !DICompositeType(tag: DW_TAG_class_type, name: "SVal", line: 12, size: 128, align: 64, file: !…
62 !16 = !DISubprogram(name: "~SVal", line: 14, isLocal: false, isDefinition: false, virtualIndex: 6, …
66 !21 = !DISubprogram(name: "SVal", line: 12, isLocal: false, isDefinition: false, virtualIndex: 6, f…
[all …]

1234