| /trueos/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| HD | 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 …]
|
| HD | 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 …]
|
| HD | 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; 245 invalidateRegions(ArrayRef<SVal> Regions, const Expr *E, 263 SVal getLValue(const ObjCIvarDecl *decl, SVal base) const; 266 SVal getLValue(const FieldDecl *decl, SVal Base) const; 269 SVal getLValue(const IndirectFieldDecl *decl, SVal Base) const; 272 SVal getLValue(QualType ElementType, SVal Idx, SVal Base) const; [all …]
|
| HD | 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 …]
|
| HD | 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 …]
|
| HD | ExprEngine.h | 268 ProgramStateRef processAssume(ProgramStateRef state, SVal cond,bool assumption); 443 SVal evalMinus(SVal X) { in evalMinus() 447 SVal evalComplement(SVal X) { in evalComplement() 453 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 458 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 459 NonLoc L, SVal R, QualType T) { in evalBinOp() 464 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op, in evalBinOp() 465 SVal LHS, SVal RHS, QualType T) { in evalBinOp() 473 SVal location, SVal Val, bool atDeclInit = false, 478 SVal Loc, SVal Val); [all …]
|
| HD | Environment.h | 60 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,
|
| /trueos/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ |
| HD | 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 …]
|
| HD | 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, 155 SVal l) const; 159 SVal l, 198 REGISTER_MAP_WITH_PROGRAMSTATE(CStringLength, const MemRegion *, SVal) in REGISTER_MAP_WITH_PROGRAMSTATE() argument [all …]
|
| HD | 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 …]
|
| HD | 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()
|
| HD | UndefinedAssignmentChecker.cpp | 30 void checkBind(SVal location, SVal val, const Stmt *S, 35 void UndefinedAssignmentChecker::checkBind(SVal location, SVal val, in checkBind()
|
| /trueos/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ |
| HD | 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 …]
|
| HD | 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 …]
|
| HD | 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 …]
|
| HD | 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()
|
| HD | 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 …]
|
| HD | 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() 204 SVal originalV = State->getSVal(loc::MemRegionVal(originalR)); in VisitBlockExpr() [all …]
|
| HD | 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()
|
| HD | 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() 136 SVal LValue = State->getLValue(Var, LCtx); in VisitCXXConstructExpr() 153 SVal ThisVal = State->getSVal(ThisPtr); in VisitCXXConstructExpr() 156 SVal FieldVal; in VisitCXXConstructExpr() 207 SVal ThisVal = State->getSVal(ThisPtr); in VisitCXXConstructExpr() 215 SVal BaseVal = getStoreManager().evalDerivedToBase(ThisVal, CE->getType(), in VisitCXXConstructExpr() 235 SVal ZeroVal = svalBuilder.makeZeroVal(getContext().CharTy); in VisitCXXConstructExpr() 299 SVal DestVal = UnknownVal(); in VisitCXXDestructor() [all …]
|
| HD | 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()
|
| HD | 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() 236 SVal ProgramState::getSValAsScalarOrLoc(const MemRegion *R) const { in getSValAsScalarOrLoc() 252 SVal ProgramState::getSVal(Loc location, QualType T) const { in getSVal() 253 SVal V = getRawSVal(cast<Loc>(location), T); in getSVal() 293 SVal V, bool Invalidate) const{ in BindExpr() 327 SVal newIdx = svalBuilder.evalBinOpNN(this, BO_Add, in assumeInBound() 333 SVal newBound = in assumeInBound() [all …]
|
| HD | CallEvent.cpp | 52 static bool isCallbackArg(SVal V, QualType T) { in isCallbackArg() 143 SmallVector<SVal, 8> ValuesToInvalidate; in invalidateRegions() 191 SVal CallEvent::getArgSVal(unsigned Index) const { in getArgSVal() 205 SVal CallEvent::getReturnValue() const { in getReturnValue() 299 SVal ArgVal = Call.getArgSVal(Idx); in addParameterValuesToBindings() 417 SVal CXXInstanceCall::getCXXThisVal() const { in getCXXThisVal() 423 SVal ThisVal = getSVal(Base); in getCXXThisVal() 496 SVal ThisVal = getCXXThisVal(); in getInitialStackFrameContents() 582 SVal CXXConstructorCall::getCXXThisVal() const { in getCXXThisVal() 598 SVal ThisVal = getCXXThisVal(); in getInitialStackFrameContents() [all …]
|
| HD | SValBuilder.cpp | 76 SVal SValBuilder::convertToArrayIndex(SVal val) { in convertToArrayIndex() 229 Optional<SVal> SValBuilder::getConstantVal(const Expr *E) { in getConstantVal() 274 Optional<SVal> ArrayVal = getConstantVal(CE->getSubExpr()); in getConstantVal() 304 SVal SValBuilder::makeSymExprValNN(ProgramStateRef State, in makeSymExprValNN() 333 SVal SValBuilder::evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 334 SVal lhs, SVal rhs, QualType type) { in evalBinOp() 399 SVal SValBuilder::evalCast(SVal val, QualType castTy, QualType originalTy) { in evalCast() 444 return R ? SVal(loc::MemRegionVal(R)) : UnknownVal(); in evalCast() 524 return R ? SVal(loc::MemRegionVal(R)) : UnknownVal(); in evalCast()
|
| HD | ExprEngine.cpp | 118 SVal V = state->getSVal(loc::MemRegionVal(R)); in getInitialState() 119 SVal Constraint_untested = evalBinOp(state, BO_GT, V, in getInitialState() 141 SVal V = state->getSVal(loc::MemRegionVal(R)); in getInitialState() 158 SVal V = state->getSVal(L); in getInitialState() 175 SVal V = State->getSVal(Ex, LC); in createTemporaryRegionIfNeeded() 224 SVal Reg = loc::MemRegionVal(TR); in createTemporaryRegionIfNeeded() 249 SVal cond, bool assumption) { in processAssume() 454 SVal thisVal = State->getSVal(svalBuilder.getCXXThis(decl, stackFrame)); in ProcessInitializer() 457 SVal FieldLoc; in ProcessInitializer() 474 SVal InitVal; in ProcessInitializer() [all …]
|