/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | SVals.h | 44 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 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 …]
|
D | Store.h | 61 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 …]
|
D | ProgramState.h | 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; 246 invalidateRegions(ArrayRef<SVal> Regions, const Expr *E, 250 ArrayRef<SVal> ConstRegions = ArrayRef<SVal>()) const; 264 SVal getLValue(const ObjCIvarDecl *decl, SVal base) const; 267 SVal getLValue(const FieldDecl *decl, SVal Base) const; 270 SVal getLValue(const IndirectFieldDecl *decl, SVal Base) const; [all …]
|
D | BasicValueFactory.h | 29 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 …]
|
D | SValBuilder.h | 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 evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op, 98 virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op, 104 virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op, 109 virtual const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal val) = 0; [all …]
|
D | ExprEngine.h | 266 ProgramStateRef processAssume(ProgramStateRef state, SVal cond,bool assumption); 441 SVal evalMinus(SVal X) { in evalMinus() 445 SVal evalComplement(SVal X) { in evalComplement() 451 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 456 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 457 NonLoc L, SVal R, QualType T) { in evalBinOp() 462 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op, in evalBinOp() 463 SVal LHS, SVal RHS, QualType T) { in evalBinOp() 471 SVal location, SVal Val, bool atDeclInit = false, 476 SVal Loc, SVal Val); [all …]
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | ArrayBoundCheckerV2.cpp | 39 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() 236 static inline SVal getValue(SVal val, SValBuilder &svalBuilder) { in getValue() [all …]
|
D | CStringChecker.cpp | 122 ProgramStateRef state, SVal V, QualType Ty); 126 SVal strLength); 127 static SVal getCStringLengthForRegion(CheckerContext &C, 132 SVal getCStringLength(CheckerContext &C, 135 SVal Buf, 141 SVal val) const; 145 const Expr *Ex, SVal V); 154 SVal l) const; 158 SVal l, 197 REGISTER_MAP_WITH_PROGRAMSTATE(CStringLength, const MemRegion *, SVal) in REGISTER_MAP_WITH_PROGRAMSTATE() argument [all …]
|
D | ObjCSelfInitChecker.cpp | 55 static bool isSelfVar(SVal location, CheckerContext &C); 69 void checkLocation(SVal location, bool isLoad, const Stmt *S, 71 void checkBind(SVal loc, SVal val, const Stmt *S, CheckerContext &C) const; 112 static SelfFlagEnum getSelfFlags(SVal val, ProgramStateRef state) { in REGISTER_MAP_WITH_PROGRAMSTATE() 119 static SelfFlagEnum getSelfFlags(SVal val, CheckerContext &C) { in getSelfFlags() 123 static void addSelfFlag(ProgramStateRef state, SVal val, in addSelfFlag() 132 static bool hasSelfFlag(SVal val, SelfFlagEnum flag, CheckerContext &C) { in hasSelfFlag() 140 SVal exprVal = C.getState()->getSVal(E, C.getLocationContext()); in isInvalidSelf() 190 SVal V = state->getSVal(Msg.getOriginExpr(), C.getLocationContext()); in checkPostObjCMessage() 256 SVal argV = CE.getArgSVal(i); in checkPreCall() [all …]
|
D | BoolAssignmentChecker.cpp | 29 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()
|
D | UndefinedAssignmentChecker.cpp | 30 void checkBind(SVal location, SVal val, const Stmt *S, 35 void UndefinedAssignmentChecker::checkBind(SVal location, SVal val, in checkBind()
|
/external/llvm/test/CodeGen/ARM/ |
D | 2010-08-04-StackVariable.ll | 4 %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/X86/ |
D | 2010-08-04-StackVariable.ll | 4 %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/DebugInfo/X86/ |
D | reference-argument.ll | 12 %class.SVal = type { i8*, i32 } 15 declare void @_Z3barR4SVal(%class.SVal* %v) 19 define linkonce_odr void @_ZN1A3fooE4SVal(%class.A* %this, %class.SVal* %v) nounwind ssp uwtable al… 24 call void @llvm.dbg.declare(metadata !{%class.SVal* %v}, metadata !62), !dbg !61 26 call void @_Z3barR4SVal(%class.SVal* %v), !dbg !61 29 declare void @_ZN4SValD1Ev(%class.SVal* %this) 30 declare void @_ZN4SValD2Ev(%class.SVal* %this) 39 …6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%class.SVal*)* @_Z3barR4SVal, n… 43 … 0, i32 0, metadata !9} ; [ DW_TAG_reference_type ] [line 0, size 0, align 0, offset 0] [from SVal] 44 …, null, metadata !"SVal", i32 12, i64 128, i64 64, i32 0, i32 0, null, metadata !10, i32 0, null, … [all …]
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | SVals.cpp | 32 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 …]
|
D | Store.cpp | 62 StoreRef StoreManager::BindDefault(Store store, const MemRegion *R, SVal V) { in BindDefault() 226 static bool regionMatchesCXXRecordType(SVal V, QualType Ty) { in regionMatchesCXXRecordType() 246 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) { in evalDerivedToBase() 253 SVal Result = Derived; in evalDerivedToBase() 262 SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) { in evalDerivedToBase() 264 SVal Result = Derived; in evalDerivedToBase() 273 SVal StoreManager::evalDerivedToBase(SVal Derived, QualType BaseType, in evalDerivedToBase() 306 SVal StoreManager::evalDynamicCast(SVal Base, QualType TargetType, in evalDynamicCast() 378 SVal StoreManager::CastRetrievedVal(SVal V, const TypedValueRegion *R, in CastRetrievedVal() 399 SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) { in getLValueFieldOrIvar() [all …]
|
D | RegionStore.cpp | 144 typedef llvm::ImmutableMap<BindingKey, SVal> ClusterBindings; 145 typedef llvm::ImmutableMapRef<BindingKey, SVal> ClusterBindingsRef; 146 typedef std::pair<BindingKey, SVal> BindingPair; 179 RegionBindingsRef addBinding(BindingKey K, SVal V) const; 182 BindingKey::Kind k, SVal V) const; 189 const SVal *lookup(BindingKey K) const; 190 const SVal *lookup(const MemRegion *R, BindingKey::Kind k) const; 205 Optional<SVal> getDirectBinding(const MemRegion *R) const; 209 Optional<SVal> getDefaultBinding(const MemRegion *R) const; 235 Optional<SVal> RegionBindingsRef::getDirectBinding(const MemRegion *R) const { in getDirectBinding() [all …]
|
D | BasicValueFactory.cpp | 24 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() 236 const std::pair<SVal, uintptr_t>& 237 BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) { in getPersistentSValWithData() 261 const std::pair<SVal, SVal>& 262 BasicValueFactory::getPersistentSValPair(const SVal& V1, const SVal& V2) { in getPersistentSValPair() 286 const SVal* BasicValueFactory::getPersistentSVal(SVal X) { in getPersistentSVal()
|
D | SimpleSValBuilder.cpp | 24 virtual SVal dispatchCast(SVal val, QualType castTy); 25 virtual SVal evalCastFromNonLoc(NonLoc val, QualType castTy); 26 virtual SVal evalCastFromLoc(Loc val, QualType castTy); 34 virtual SVal evalMinus(NonLoc val); 35 virtual SVal evalComplement(NonLoc val); 36 virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op, 38 virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op, 40 virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op, 45 virtual const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal V); 47 SVal MakeSymIntVal(const SymExpr *LHS, BinaryOperator::Opcode op, [all …]
|
D | ExprEngineC.cpp | 40 SVal LeftV = state->getSVal(LHS, LCtx); in VisitBinaryOperator() 41 SVal RightV = state->getSVal(RHS, LCtx); in VisitBinaryOperator() 54 SVal ExprVal = B->isGLValue() ? LeftV : RightV; in VisitBinaryOperator() 86 SVal Result = evalBinOp(state, Op, LeftV, RightV, B->getType()); in VisitBinaryOperator() 117 SVal location = LeftV; in VisitBinaryOperator() 125 SVal V = state->getSVal(LHS, LCtx); in VisitBinaryOperator() 142 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy), in VisitBinaryOperator() 148 SVal LHSVal; in VisitBinaryOperator() 186 SVal V = svalBuilder.getBlockPointer(BE->getBlockDecl(), T, in VisitBlockExpr() 203 SVal originalV = State->getSVal(loc::MemRegionVal(originalR)); in VisitBlockExpr() [all …]
|
D | ExprEngineObjC.cpp | 27 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() 161 SVal recVal = UpdatedMsg->getReceiverSVal(); in VisitObjCMessage()
|
D | ExprEngineCXX.cpp | 41 SVal ThisVal; in performTrivialCopy() 61 SVal V = Call.getArgSVal(0); in performTrivialCopy() 92 static SVal makeZeroElementRegion(ProgramStateRef State, SVal LValue, in makeZeroElementRegion() 130 SVal LValue = State->getLValue(Var, LCtx); in VisitCXXConstructExpr() 147 SVal ThisVal = State->getSVal(ThisPtr); in VisitCXXConstructExpr() 150 SVal FieldVal; in VisitCXXConstructExpr() 201 SVal ThisVal = State->getSVal(ThisPtr); in VisitCXXConstructExpr() 209 SVal BaseVal = getStoreManager().evalDerivedToBase(ThisVal, CE->getType(), in VisitCXXConstructExpr() 229 SVal ZeroVal = svalBuilder.makeZeroVal(getContext().CharTy); in VisitCXXConstructExpr() 293 SVal DestVal = loc::MemRegionVal(Dest); in VisitCXXDestructor() [all …]
|
D | Environment.cpp | 59 SVal Environment::lookupExpr(const EnvironmentEntry &E) const { in lookupExpr() 60 const SVal* X = ExprBindings.lookup(E); in lookupExpr() 62 SVal V = *X; in lookupExpr() 68 SVal Environment::getSVal(const EnvironmentEntry &Entry, in getSVal() 110 SVal V, in bindExpr() 157 llvm::ImmutableMapRef<EnvironmentEntry,SVal> in removeDeadBindings() 166 const SVal &X = I.getData(); in removeDeadBindings()
|
D | ProgramState.cpp | 114 ProgramStateRef ProgramState::bindLoc(Loc LV, SVal V, bool notifyChanges) const { in bindLoc() 125 ProgramStateRef ProgramState::bindDefault(SVal loc, SVal V) const { in bindDefault() 136 typedef ArrayRef<SVal> ValueList; 146 SmallVector<SVal, 8> Values; in invalidateRegions() 151 SmallVector<SVal, 8> ConstValues; in invalidateRegions() 256 SVal ProgramState::getSValAsScalarOrLoc(const MemRegion *R) const { in getSValAsScalarOrLoc() 272 SVal ProgramState::getSVal(Loc location, QualType T) const { in getSVal() 273 SVal V = getRawSVal(cast<Loc>(location), T); in getSVal() 313 SVal V, bool Invalidate) const{ in BindExpr() 347 SVal newIdx = svalBuilder.evalBinOpNN(this, BO_Add, in assumeInBound() [all …]
|
D | CallEvent.cpp | 52 static bool isCallbackArg(SVal V, QualType T) { in isCallbackArg() 143 SmallVector<SVal, 8> ConstValues; in invalidateRegions() 144 SmallVector<SVal, 8> ValuesToInvalidate; in invalidateRegions() 188 SVal CallEvent::getArgSVal(unsigned Index) const { in getArgSVal() 202 SVal CallEvent::getReturnValue() const { in getReturnValue() 283 SVal ArgVal = Call.getArgSVal(Idx); in addParameterValuesToBindings() 401 SVal CXXInstanceCall::getCXXThisVal() const { in getCXXThisVal() 407 SVal ThisVal = getSVal(Base); in getCXXThisVal() 480 SVal ThisVal = getCXXThisVal(); in getInitialStackFrameContents() 566 SVal CXXConstructorCall::getCXXThisVal() const { in getCXXThisVal() [all …]
|