Searched refs:SVal (Results 1 - 25 of 76) sorted by relevance

1234

/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
H A DSVals.h10 // This file defines SVal, Loc, and NonLoc, classes that represent
24 // Base SVal types.
41 /// SVal - This represents a symbolic expression, which can be either
44 class SVal { class in namespace:clang::ento
63 explicit SVal(const void *d, bool isLoc, unsigned ValKind) function in class:clang::ento::SVal
66 explicit SVal(BaseKind k, const void *D = nullptr) function in class:clang::ento::SVal
70 explicit SVal() : Data(nullptr), Kind(0) {} function in class:clang::ento::SVal
72 /// \brief Convert to the specified SVal type, asserting that this SVal is of
78 SVal
[all...]
H A 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) {
102 virtual SVal getLValueElement(QualType elementType, NonLoc offset, SVal Base);
114 virtual SVal ArrayToPointe
[all...]
H A DBasicValueFactory.h29 llvm::ImmutableList<SVal> L;
32 CompoundValData(QualType t, llvm::ImmutableList<SVal> l)
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() {
179 llvm::ImmutableList<SVal> consVals(SVal X, llvm::ImmutableList<SVal>
[all...]
H A DSValBuilder.h11 // "symbolical evaluators" which construct an SVal from an expression.
53 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;
85 SVal evalCast(SVal val, QualType castTy, QualType originalType);
87 virtual SVal evalMinus(NonLoc val) = 0;
89 virtual SVal evalComplement(NonLoc val) = 0;
93 virtual SVal evalBinOpN
[all...]
H A DProgramState.h85 Environment Env; // Maps a Stmt to its current SVal.
193 /// \brief Check if the given SVal is constrained to zero or is a zero
195 ConditionTruthVal isNull(SVal V) const;
207 SVal V, bool Invalidate = true) const;
210 SVal V,
213 ProgramStateRef bindLoc(SVal location, SVal V) const;
215 ProgramStateRef bindDefault(SVal loc, SVal V) const;
245 invalidateRegions(ArrayRef<SVal> Region
[all...]
H A DEnvironment.h60 typedef llvm::ImmutableMap<EnvironmentEntry, SVal> BindingsTy;
68 SVal lookupExpr(const EnvironmentEntry &E) const;
77 SVal getSVal(const EnvironmentEntry &E, SValBuilder &svalBuilder) const;
116 Environment bindExpr(Environment Env, const EnvironmentEntry &E, SVal V,
H A DExprEngine.h269 ProgramStateRef processAssume(ProgramStateRef state, SVal cond,
449 SVal evalMinus(SVal X) {
453 SVal evalComplement(SVal X) {
459 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op,
464 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op,
465 NonLoc L, SVal R, QualType T) {
470 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op,
471 SVal LH
[all...]
/external/clang/lib/StaticAnalyzer/Checkers/
H A DArrayBoundCheckerV2.cpp39 void checkLocation(SVal l, bool isLoad, const Stmt*S,
47 SVal byteOffset;
53 RegionRawOffsetV2(const SubRegion* base, SVal offset)
61 SVal location);
68 static SVal computeExtentBegin(SValBuilder &svalBuilder,
84 void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad,
111 SVal extentBegin = computeExtentBegin(svalBuilder, rawOffset.getRegion());
114 SVal lowerBound =
145 SVal upperbound
236 static inline SVal getValu
[all...]
H A DUndefinedAssignmentChecker.cpp30 void checkBind(SVal location, SVal val, const Stmt *S,
35 void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
H A 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,
85 SVal greaterThanOrEqualToZeroVal =
93 // The SValBuilder cannot construct a valid SVal for this condition.
121 SVal lessThanEqToOneVal =
129 // The SValBuilder cannot construct a valid SVal for this condition.
H A 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) {
114 static SelfFlagEnum getSelfFlags(SVal val, CheckerContext &C) {
118 static void addSelfFlag(ProgramStateRef state, SVal val,
120 // We tag the symbol that the SVal wraps.
127 static bool hasSelfFlag(SVal val, SelfFlagEnum flag, CheckerContext &C) {
135 SVal exprVa
[all...]
H A 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());
138 bool TestAfterDivZeroChecker::isZero(SVal S, CheckerContext &C) const {
148 void TestAfterDivZeroChecker::setDivZeroMap(SVal Var, CheckerContext &C) const {
159 bool TestAfterDivZeroChecker::hasDivZeroMap(SVal Var,
169 void TestAfterDivZeroChecker::reportBug(SVal Val, CheckerContext &C) const {
207 SVal
[all...]
H A DCheckerDocumentation.cpp128 void checkLocation(SVal Loc, bool IsLoad, const Stmt *S,
138 void checkBind(SVal Loc, SVal Val, const Stmt *S, CheckerContext &) const {}
208 SVal Cond,
H A DArrayBoundChecker.cpp31 void checkLocation(SVal l, bool isLoad, const Stmt* S,
36 void ArrayBoundChecker::checkLocation(SVal l, bool isLoad, const Stmt* LoadS,
H A DPointerArithChecker.cpp41 SVal LV = state->getSVal(B->getLHS(), LCtx);
42 SVal RV = state->getSVal(B->getRHS(), LCtx);
H A DPointerSubChecker.cpp44 SVal LV = state->getSVal(B->getLHS(), LCtx);
45 SVal RV = state->getSVal(B->getRHS(), LCtx);
H A DCStringChecker.cpp124 ProgramStateRef state, SVal V, QualType Ty);
128 SVal strLength);
129 static SVal getCStringLengthForRegion(CheckerContext &C,
134 SVal getCStringLength(CheckerContext &C,
137 SVal Buf,
143 SVal val) const;
147 const Expr *Ex, SVal V,
157 SVal l) const;
161 SVal l,
200 REGISTER_MAP_WITH_PROGRAMSTATE(CStringLength, const MemRegion *, SVal)
[all...]
/external/clang/lib/StaticAnalyzer/Core/
H A DSVals.cpp10 // This file defines SVal, Loc, and NonLoc, classes that represent
24 // Symbol iteration within an SVal.
32 bool SVal::hasConjuredSymbol() const {
51 const FunctionDecl *SVal::getAsFunctionDecl() const {
62 /// \brief If this SVal is a location (subclasses Loc) and wraps a symbol,
69 SymbolRef SVal::getAsLocSymbol(bool IncludeBaseRegions) const {
84 /// Get the symbol in the SVal or its base region.
85 SymbolRef SVal::getLocSymbolInBase() const {
105 /// \brief If this SVal wraps a symbol return that SymbolRef.
111 SymbolRef SVal
[all...]
H A DBasicValueFactory.cpp24 llvm::ImmutableList<SVal> L) {
36 typedef std::pair<SVal, uintptr_t> SValData;
37 typedef std::pair<SVal, SVal> SValPair;
109 llvm::ImmutableList<SVal> Vals) {
236 const std::pair<SVal, uintptr_t>&
237 BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) {
261 const std::pair<SVal, SVal>&
262 BasicValueFactory::getPersistentSValPair(const SVal
[all...]
H A DStore.cpp62 StoreRef StoreManager::BindDefault(Store store, const MemRegion *R, SVal V) {
226 static bool regionMatchesCXXRecordType(SVal V, QualType Ty) {
246 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) {
253 SVal Result = Derived;
262 SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) {
264 SVal Result = Derived;
273 SVal StoreManager::evalDerivedToBase(SVal Derive
[all...]
H A DRegionStore.cpp142 typedef llvm::ImmutableMap<BindingKey, SVal> ClusterBindings;
143 typedef llvm::ImmutableMapRef<BindingKey, SVal> ClusterBindingsRef;
144 typedef std::pair<BindingKey, SVal> BindingPair;
177 RegionBindingsRef addBinding(BindingKey K, SVal V) const;
180 BindingKey::Kind k, SVal V) const;
187 const SVal *lookup(BindingKey K) const;
188 const SVal *lookup(const MemRegion *R, BindingKey::Kind k) const;
203 Optional<SVal> getDirectBinding(const MemRegion *R) const;
205 /// getDefaultBinding - Returns an SVal* representing an optional default
207 Optional<SVal> getDefaultBindin
[all...]
H A DExprEngineC.cpp40 SVal LeftV = state->getSVal(LHS, LCtx);
41 SVal RightV = state->getSVal(RHS, LCtx);
55 SVal ExprVal = B->isGLValue() ? LeftV : RightV;
93 SVal Result = evalBinOp(state, Op, LeftV, RightV, B->getType());
124 SVal location = LeftV;
132 SVal V = state->getSVal(LHS, LCtx);
149 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy),
155 SVal LHSVal;
193 SVal V = svalBuilder.getBlockPointer(BE->getBlockDecl(), T,
211 SVal original
[all...]
H A DExprEngineObjC.cpp27 SVal baseVal = state->getSVal(Ex->getBase(), LCtx);
28 SVal location = state->getLValue(Ex->getDecl(), baseVal);
64 // through an SVal or through the use of MemRegions. This value can
67 // we can test if the SVal is 0 or if the MemRegion is null (depending
76 SVal elementV;
100 SVal TrueV = svalBuilder.makeTruthVal(1);
104 SVal FalseV = svalBuilder.makeTruthVal(0);
117 SVal V = svalBuilder.makeLoc(Sym);
121 SVal nilV = svalBuilder.makeIntVal(0, T);
161 SVal recVa
[all...]
H A DEnvironment.cpp60 SVal Environment::lookupExpr(const EnvironmentEntry &E) const {
61 const SVal* X = ExprBindings.lookup(E);
63 SVal V = *X;
69 SVal Environment::getSVal(const EnvironmentEntry &Entry,
111 SVal V,
158 llvm::ImmutableMapRef<EnvironmentEntry,SVal>
167 const SVal &X = I.getData();
H A 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,
43 /// getKnownValue - evaluates a given SVal
[all...]

Completed in 318 milliseconds

1234