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

1234

/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
H A 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) {
108 virtual SVal getLValueElement(QualType elementType, NonLoc offset, SVal Bas
[all...]
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 = NULL) function in class:clang::ento::SVal
70 explicit SVal() : Data(0), Kind(0) {} function in class:clang::ento::SVal
71 ~SVal() {}
74 typedef SmallVector<SVal,5> BufferTy;
80 // This method is required for using SVal i
160 classof(const SVal*) argument
[all...]
H A DBasicValueFactory.h27 llvm::ImmutableList<SVal> L;
30 CompoundValData(QualType t, llvm::ImmutableList<SVal> l)
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() {
178 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;
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 evalBinOpN
[all...]
H A 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);
H A DProgramState.h84 Environment Env; // Maps a Stmt to its current SVal.
191 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 lo
[all...]
H A DExprEngine.h210 ProgramStateRef processAssume(ProgramStateRef state, SVal cond,bool assumption);
393 SVal evalMinus(SVal X) {
397 SVal evalComplement(SVal X) {
403 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op,
408 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op,
409 NonLoc L, SVal R, QualType T) {
413 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op,
414 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
146 SVal upperbound
237 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 DCheckerDocumentation.cpp96 void checkLocation(SVal Loc, bool IsLoad, const Stmt *S,
106 void checkBind(SVal Loc, SVal Val, const Stmt *S, CheckerContext &C) const {}
177 SVal Cond,
H A 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> EntryMa
[all...]
H A 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) {
135 static SelfFlagEnum getSelfFlags(SVal val, CheckerContext &C) {
139 static void addSelfFlag(ProgramStateRef state, SVal val,
141 // We tag the symbol that the SVal wraps.
146 static bool hasSelfFlag(SVal val, SelfFlagEnum flag, CheckerContext &C) {
154 SVal exprVal = C.getState()->getSVal(E, C.getLocationContext());
204 SVal V = state->getSVal(msg.getMessageExpr(), C.getLocationContext());
286 SVal arg
[all...]
H A DArrayBoundChecker.cpp30 void checkLocation(SVal l, bool isLoad, const Stmt* S,
35 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 DPthreadLockChecker.cpp38 void AcquireLock(CheckerContext &C, const CallExpr *CE, SVal lock,
41 void ReleaseLock(CheckerContext &C, const CallExpr *CE, SVal lock) const;
96 SVal lock, bool isTryLock,
105 SVal X = state->getSVal(CE, C.getLocationContext());
159 SVal lock) const {
H A DOSAtomicChecker.cpp42 SVal L = State->getSVal(Callee, LCtx);
110 SVal location = state->getSVal(theValueExpr, LCtx);
141 SVal theValueVal_untested = stateLoad->getSVal(theValueExpr, LCtx, true);
143 SVal oldValueVal_untested = stateLoad->getSVal(oldValueExpr, LCtx);
167 SVal val = stateEqual->getSVal(newValueExpr, LCtx);
191 SVal Res = UnknownVal();
203 SVal Res = UnknownVal();
/external/clang/lib/StaticAnalyzer/Core/
H A DSVals.cpp10 // This file defines SVal, Loc, and NonLoc, classes that represent
23 // Symbol iteration within an SVal.
31 bool SVal::hasConjuredSymbol() const {
50 const FunctionDecl *SVal::getAsFunctionDecl() const {
60 /// \brief If this SVal is a location (subclasses Loc) and wraps a symbol,
65 SymbolRef SVal::getAsLocSymbol() const {
78 /// Get the symbol in the SVal or its base region.
79 SymbolRef SVal::getLocSymbolInBase() const {
99 /// \brief If this SVal wraps a symbol return that SymbolRef.
101 SymbolRef SVal
[all...]
H A DBasicValueFactory.cpp23 llvm::ImmutableList<SVal> L) {
35 typedef std::pair<SVal, uintptr_t> SValData;
36 typedef std::pair<SVal, SVal> SValPair;
112 llvm::ImmutableList<SVal> Vals) {
239 const std::pair<SVal, uintptr_t>&
240 BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) {
264 const std::pair<SVal, SVal>&
265 BasicValueFactory::getPersistentSValPair(const SVal
[all...]
H A DObjCMessage.cpp47 SVal CallOrObjCMessage::getFunctionCallee() const {
54 SVal CallOrObjCMessage::getCXXCallee() const {
68 SVal
85 SVal CalleeVal = getFunctionCallee();
H A DEnvironment.cpp23 SVal Environment::lookupExpr(const EnvironmentEntry &E) const {
24 const SVal* X = ExprBindings.lookup(E);
26 SVal V = *X;
32 SVal Environment::getSVal(const EnvironmentEntry &Entry,
68 const SVal *X = ExprBindings.lookup(EnvironmentEntry(E, LCtx));
76 SVal const *X = ExprBindings.lookup(EnvironmentEntry(E, LCtx));
85 // For special C0xx nullptr case, make a null pointer SVal.
126 SVal V,
145 SVal location, SVal
[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);
152 SVal recVa
[all...]
H A DRegionStore.cpp110 typedef llvm::ImmutableMap<BindingKey, SVal> RegionBindings;
211 Optional<SVal> getDirectBinding(RegionBindings B, const MemRegion *R);
212 /// getDefaultBinding - Returns an SVal* representing an optional default
214 Optional<SVal> getDefaultBinding(RegionBindings B, const MemRegion *R);
223 /// to a pointer, and the returned SVal represents the decayed
227 SVal ArrayToPointer(Loc Array);
230 virtual SVal evalDerivedToBase(SVal derived, QualType basePtrType);
238 /// The function returns an SVal representing the derived class; it's
240 virtual SVal evalDynamicCas
[all...]
H A DStore.cpp49 StoreRef StoreManager::BindDefault(Store store, const MemRegion *R, SVal V) {
217 SVal StoreManager::CastRetrievedVal(SVal V, const TypedValueRegion *R,
238 SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) {
273 SVal StoreManager::getLValueIvar(const ObjCIvarDecl *decl, SVal base) {
277 SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset,
278 SVal Base) {
309 SVal BaseId
[all...]

Completed in 414 milliseconds

1234