Searched refs:SVal (Results 1 - 25 of 78) 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);
89 SVal V) = 0;
108 virtual SVal getLValueIvar(const ObjCIvarDecl *decl, SVal base);
110 virtual SVal getLValueField(const FieldDecl *D, SVal Base) {
114 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
73 typedef SmallVector<SVal,5> BufferTy;
79 // This method is required for using SVal in a FoldingSetNode. It
80 // extracts a unique signature for this SVal objec
159 classof(const SVal*) argument
[all...]
H A DBasicValueFactory.h28 llvm::ImmutableList<SVal> L;
31 CompoundValData(QualType t, llvm::ImmutableList<SVal> l)
34 typedef llvm::ImmutableList<SVal>::iterator iterator;
39 llvm::ImmutableList<SVal> L);
72 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.
54 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;
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 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.h85 Environment Env; // Maps a Stmt to its current SVal.
199 SVal V) const;
204 SVal V, bool Invalidate = true) const;
210 SVal location, SVal V) const;
213 SVal V,
216 ProgramStateRef bindLoc(SVal location, SVal V) const;
218 ProgramStateRef bindDefault(SVal loc, SVal
[all...]
H A DExprEngine.h234 ProgramStateRef processAssume(ProgramStateRef state, SVal cond,bool assumption);
412 SVal evalMinus(SVal X) {
416 SVal evalComplement(SVal X) {
422 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op,
427 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op,
428 NonLoc L, SVal R, QualType T) {
432 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op,
433 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 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 DCheckerDocumentation.cpp125 void checkLocation(SVal Loc, bool IsLoad, const Stmt *S,
135 void checkBind(SVal Loc, SVal Val, const Stmt *S, CheckerContext &) const {}
206 SVal Cond,
H A DObjCSelfInitChecker.cpp54 static bool isSelfVar(SVal location, CheckerContext &C);
68 void checkLocation(SVal location, bool isLoad, const Stmt *S,
70 void checkBind(SVal loc, SVal val, const Stmt *S, CheckerContext &C) const;
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.
147 static bool hasSelfFlag(SVal val, SelfFlagEnum flag, CheckerContext &C) {
155 SVal exprVa
[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 {
/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.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.cpp61 StoreRef StoreManager::BindDefault(Store store, const MemRegion *R, SVal V) {
225 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) {
227 SVal Result = Derived;
240 SVal StoreManager::CastRetrievedVal(SVal V, const TypedValueRegion *R,
261 SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) {
296 SVal StoreManager::getLValueIvar(const ObjCIvarDecl *decl, SVal bas
[all...]
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));
81 SVal const *X = ExprBindings.lookup(EnvironmentEntry(E, LCtx));
90 // For special C0xx nullptr case, make a null pointer SVal.
135 SVal V,
154 SVal location, SVal
[all...]
H A DRegionStore.cpp136 typedef llvm::ImmutableMap<BindingKey, SVal> ClusterBindings;
178 Optional<SVal> getDirectBinding(RegionBindings B, const MemRegion *R);
179 /// getDefaultBinding - Returns an SVal* representing an optional default
181 Optional<SVal> getDefaultBinding(RegionBindings B, const MemRegion *R);
190 /// to a pointer, and the returned SVal represents the decayed
194 SVal ArrayToPointer(Loc Array);
197 virtual SVal evalDerivedToBase(SVal derived, QualType basePtrType);
205 /// The function returns an SVal representing the derived class; it's
207 virtual SVal evalDynamicCas
[all...]
H A DExprEngineC.cpp39 SVal LeftV = state->getSVal(LHS, LCtx);
40 SVal RightV = state->getSVal(RHS, LCtx);
53 SVal ExprVal = B->isGLValue() ? LeftV : RightV;
83 SVal Result = evalBinOp(state, Op, LeftV, RightV, B->getType());
114 SVal location = LeftV;
122 SVal V = state->getSVal(LHS, LCtx);
139 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy),
145 SVal LHSVal;
183 SVal V = svalBuilder.getBlockPointer(BE->getBlockDecl(), T,
200 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);
169 SVal recVa
[all...]
H A DExprEngineCXX.cpp35 SVal V = state->getSVal(tempExpr, LCtx);
44 SVal L = loc::MemRegionVal(R);
78 SVal Base = State->getLValue(Var, LCtx);
98 SVal ThisVal = State->getSVal(ThisPtr);
101 SVal Field = State->getLValue(Init->getIndirectMember(), ThisVal);
104 SVal Field = State->getLValue(Init->getMember(), ThisVal);
127 SVal ThisVal = State->getSVal(ThisPtr);
134 SVal BaseVal = getStoreManager().evalDerivedToBase(ThisVal, BaseTy);
252 SVal PlacementLoc = State->getSVal(CNE->getPlacementArg(0), LCtx);
253 SVal Resul
[all...]

Completed in 262 milliseconds

1234