/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 = 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 …]
|
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 | 217 ConditionTruthVal isNull(SVal V) const; 229 SVal V, bool Invalidate = true) const; 232 SVal V, 235 ProgramStateRef bindLoc(SVal location, SVal V) const; 237 ProgramStateRef bindDefault(SVal loc, SVal V) const; 267 invalidateRegions(ArrayRef<SVal> Regions, const Expr *E, 285 SVal getLValue(const ObjCIvarDecl *decl, SVal base) const; 288 SVal getLValue(const FieldDecl *decl, SVal Base) const; 291 SVal getLValue(const IndirectFieldDecl *decl, SVal Base) const; 294 SVal getLValue(QualType ElementType, SVal Idx, 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 | 278 ProgramStateRef processAssume(ProgramStateRef state, SVal cond, 466 SVal evalMinus(SVal X) { in evalMinus() 470 SVal evalComplement(SVal X) { in evalComplement() 476 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 481 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 482 NonLoc L, SVal R, QualType T) { in evalBinOp() 487 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op, in evalBinOp() 488 SVal LHS, SVal RHS, QualType T) { in evalBinOp() 496 SVal location, SVal Val, bool atDeclInit = false, 501 SVal Loc, SVal Val) override; [all …]
|
/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 !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/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 !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/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() 226 static inline SVal getValue(SVal val, SValBuilder &svalBuilder) { in getValue() [all …]
|
D | CStringChecker.cpp | 124 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, 158 SVal l) const; 162 SVal l, 209 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); 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 …]
|
D | TestAfterDivZeroChecker.cpp | 83 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 …]
|
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()
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | Store.cpp | 51 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 …]
|
D | RegionStore.cpp | 142 typedef llvm::ImmutableMap<BindingKey, SVal> ClusterBindings; 143 typedef llvm::ImmutableMapRef<BindingKey, SVal> ClusterBindingsRef; 144 typedef std::pair<BindingKey, SVal> BindingPair; 178 RegionBindingsRef addBinding(BindingKey K, SVal V) const; 181 BindingKey::Kind k, SVal V) const; 183 const SVal *lookup(BindingKey K) const; 184 const SVal *lookup(const MemRegion *R, BindingKey::Kind k) const; 197 Optional<SVal> getDirectBinding(const MemRegion *R) const; 201 Optional<SVal> getDefaultBinding(const MemRegion *R) const; 225 Optional<SVal> RegionBindingsRef::getDirectBinding(const MemRegion *R) const { in getDirectBinding() [all …]
|
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 | 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() 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()
|
D | SimpleSValBuilder.cpp | 24 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 …]
|
D | ExprEngineC.cpp | 40 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 …]
|
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() 172 SVal recVal = Msg->getReceiverSVal(); in VisitObjCMessage() 231 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() 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 …]
|
D | Environment.cpp | 60 SVal Environment::lookupExpr(const EnvironmentEntry &E) const { in lookupExpr() 61 const SVal* X = ExprBindings.lookup(E); in lookupExpr() 63 SVal V = *X; in lookupExpr() 69 SVal Environment::getSVal(const EnvironmentEntry &Entry, in getSVal() 112 SVal V, in bindExpr() 159 llvm::ImmutableMapRef<EnvironmentEntry,SVal> in removeDeadBindings() 168 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() 235 SVal ProgramState::getSValAsScalarOrLoc(const MemRegion *R) const { in getSValAsScalarOrLoc() 251 SVal ProgramState::getSVal(Loc location, QualType T) const { in getSVal() 252 SVal V = getRawSVal(cast<Loc>(location), T); in getSVal() 292 SVal V, bool Invalidate) const{ in BindExpr() 326 SVal newIdx = svalBuilder.evalBinOpNN(this, BO_Add, in assumeInBound() 332 SVal newBound = in assumeInBound() [all …]
|
D | CallEvent.cpp | 165 SmallVector<SVal, 8> ValuesToInvalidate; in invalidateRegions() 213 SVal CallEvent::getArgSVal(unsigned Index) const { in getArgSVal() 227 SVal CallEvent::getReturnValue() const { in getReturnValue() 319 SVal ArgVal = Call.getArgSVal(Idx); in addParameterValuesToBindings() 425 SVal ThisVal = getCXXThisVal(); in getExtraInvalidatedValues() 449 SVal CXXInstanceCall::getCXXThisVal() const { in getCXXThisVal() 455 SVal ThisVal = getSVal(Base); in getCXXThisVal() 528 SVal ThisVal = getCXXThisVal(); in getInitialStackFrameContents() 611 SVal ThisVal = loc::MemRegionVal(CapturedLambdaRegion); in getInitialStackFrameContents() 623 SVal CXXConstructorCall::getCXXThisVal() const { in getCXXThisVal() [all …]
|
/external/llvm/test/DebugInfo/X86/ |
D | reference-argument.ll | 20 %class.SVal = type { i8*, i32 } 23 declare void @_Z3barR4SVal(%class.SVal* %v) 28 define linkonce_odr void @_ZN1A3fooE4SVal(%class.A* %this, %class.SVal* %v) nounwind ssp uwtable al… 33 …call void @llvm.dbg.value(metadata %class.SVal* %v, i64 0, metadata !62, metadata !DIExpression(DW… 35 call void @_Z3barR4SVal(%class.SVal* %v), !dbg !61 38 declare void @_ZN4SValD1Ev(%class.SVal* %this) 39 declare void @_ZN4SValD2Ev(%class.SVal* %this) 53 !9 = !DICompositeType(tag: DW_TAG_class_type, name: "SVal", line: 12, size: 128, align: 64, file: !… 60 !16 = !DISubprogram(name: "~SVal", line: 14, isLocal: false, isDefinition: false, virtualIndex: 6, … 64 !21 = !DISubprogram(name: "SVal", line: 12, isLocal: false, isDefinition: false, virtualIndex: 6, f… [all …]
|