| /netbsd-src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | SVals.h | 75 class SVal { 92 explicit SVal(const void *d, bool isLoc, unsigned ValKind) in SVal() function 95 explicit SVal(BaseKind k, const void *D = nullptr) : Data(D), Kind(k) {} in Data() 98 explicit SVal() = default; 128 bool operator==(const SVal &R) const { 132 bool operator!=(const SVal &R) const { 206 inline raw_ostream &operator<<(raw_ostream &os, clang::ento::SVal V) { 211 class UndefinedVal : public SVal { 213 UndefinedVal() : SVal(UndefinedValKind) {} in UndefinedVal() 216 friend class SVal; [all …]
|
| H A D | SValBuilder.h | 75 SVal evalCastKind(UndefinedVal V, QualType CastTy, QualType OriginalTy); 76 SVal evalCastKind(UnknownVal V, QualType CastTy, QualType OriginalTy); 77 SVal evalCastKind(Loc V, QualType CastTy, QualType OriginalTy); 78 SVal evalCastKind(NonLoc V, QualType CastTy, QualType OriginalTy); 79 SVal evalCastSubKind(loc::ConcreteInt V, QualType CastTy, 81 SVal evalCastSubKind(loc::GotoLabel V, QualType CastTy, QualType OriginalTy); 82 SVal evalCastSubKind(loc::MemRegionVal V, QualType CastTy, 84 SVal evalCastSubKind(nonloc::CompoundVal V, QualType CastTy, 86 SVal evalCastSubKind(nonloc::ConcreteInt V, QualType CastTy, 88 SVal evalCastSubKind(nonloc::LazyCompoundVal V, QualType CastTy, [all …]
|
| H A D | Store.h | 74 virtual SVal getBinding(Store store, Loc loc, QualType T = QualType()) = 0; 86 virtual Optional<SVal> getDefaultBinding(Store store, const MemRegion *R) = 0; 96 Optional<SVal> getDefaultBinding(nonloc::LazyCompoundVal lcv) { in getDefaultBinding() 107 virtual StoreRef Bind(Store store, Loc loc, SVal val) = 0; 113 SVal V) = 0; 143 virtual SVal getLValueIvar(const ObjCIvarDecl *decl, SVal base); 145 virtual SVal getLValueField(const FieldDecl *D, SVal Base) { in getLValueField() 149 virtual SVal getLValueElement(QualType elementType, NonLoc offset, SVal Base); 153 virtual SVal ArrayToPointer(Loc Array, QualType ElementTy) = 0; 157 SVal evalDerivedToBase(SVal Derived, const CastExpr *Cast); [all …]
|
| H A D | ProgramState.h | 219 ConditionTruthVal isNonNull(SVal V) const; 223 ConditionTruthVal isNull(SVal V) const; 226 ConditionTruthVal areEqual(SVal Lhs, SVal Rhs) const; 238 const LocationContext *LCtx, SVal V, 241 LLVM_NODISCARD ProgramStateRef bindLoc(Loc location, SVal V, 245 LLVM_NODISCARD ProgramStateRef bindLoc(SVal location, SVal V, 255 bindDefaultInitial(SVal loc, SVal V, const LocationContext *LCtx) const; 260 bindDefaultZero(SVal loc, const LocationContext *LCtx) const; 290 invalidateRegions(ArrayRef<SVal> Regions, const Expr *E, 302 SVal getSelfSVal(const LocationContext *LC) const; [all …]
|
| H A D | BasicValueFactory.h | 43 llvm::ImmutableList<SVal> L; 46 CompoundValData(QualType t, llvm::ImmutableList<SVal> l) : T(t), L(l) { in CompoundValData() 50 using iterator = llvm::ImmutableList<SVal>::iterator; 56 llvm::ImmutableList<SVal> L); 117 llvm::ImmutableList<SVal>::Factory SValListFactory; 240 llvm::ImmutableList<SVal> Vals); 249 llvm::ImmutableList<SVal> getEmptySValList() { in getEmptySValList() 253 llvm::ImmutableList<SVal> prependSVal(SVal X, llvm::ImmutableList<SVal> L) { in prependSVal() 275 const std::pair<SVal, uintptr_t>& 276 getPersistentSValWithData(const SVal& V, uintptr_t Data); [all …]
|
| H A D | ExprEngine.h | 390 ProgramStateRef processAssume(ProgramStateRef state, SVal cond, 593 SVal evalMinus(SVal X) { in evalMinus() 597 SVal evalComplement(SVal X) { in evalComplement() 618 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 623 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 624 NonLoc L, SVal R, QualType T) { in evalBinOp() 629 SVal evalBinOp(ProgramStateRef ST, BinaryOperator::Opcode Op, in evalBinOp() 630 SVal LHS, SVal RHS, QualType T) { in evalBinOp() 637 static Optional<SVal> 644 ProgramStateRef State, ArrayRef<std::pair<SVal, SVal>> LocAndVals, [all …]
|
| H A D | SVals.def | 1 //===-- SVals.def - Metadata about SVal kinds -------------------*- C++ -*-===// 9 // The list of symbolic values (SVal kinds and sub-kinds) used in the Static 10 // Analyzer. The distinction between loc:: and nonloc:: SVal namespaces is 15 // BASIC_SVAL(Id, Parent) - for specific SVal sub-kinds, which are 19 // ABSTRACT_SVAL(Id, Parent) - for abstract SVal classes which are 22 // ABSTRACT_SVAL_WITH_KIND(Id, Parent) - for SVal classes which are also 54 BASIC_SVAL(UndefinedVal, SVal) 55 ABSTRACT_SVAL(DefinedOrUnknownSVal, SVal)
|
| /netbsd-src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | IteratorModeling.cpp | 92 SVal, SVal, SVal) const; 100 void handleComparison(CheckerContext &C, const Expr *CE, SVal RetVal, 101 const SVal &LVal, const SVal &RVal, 104 SymbolRef Sym1, SymbolRef Sym2, const SVal &RetVal, 106 void handleIncrement(CheckerContext &C, const SVal &RetVal, const SVal &Iter, 108 void handleDecrement(CheckerContext &C, const SVal &RetVal, const SVal &Iter, 111 OverloadedOperatorKind Op, const SVal &RetVal, 112 const SVal &Iterator, const SVal &Amount) const; 114 OverloadedOperatorKind OK, SVal Offset) const; 115 void handleAdvance(CheckerContext &C, const Expr *CE, SVal RetVal, SVal Iter, [all …]
|
| H A D | IteratorRangeChecker.cpp | 37 void verifyDereference(CheckerContext &C, SVal Val) const; 38 void verifyIncrement(CheckerContext &C, SVal Iter) const; 39 void verifyDecrement(CheckerContext &C, SVal Iter) const; 41 SVal LHS, SVal RHS) const; 42 void verifyAdvance(CheckerContext &C, SVal LHS, SVal RHS) const; 43 void verifyPrev(CheckerContext &C, SVal LHS, SVal RHS) const; 44 void verifyNext(CheckerContext &C, SVal LHS, SVal RHS) const; 45 void reportBug(const StringRef &Message, SVal Val, CheckerContext &C, 57 using AdvanceFn = void (IteratorRangeChecker::*)(CheckerContext &, SVal, 58 SVal) const; [all …]
|
| H A D | GTestChecker.cpp | 111 SVal 113 SVal Instance, 116 static ProgramStateRef assumeValuesEqual(SVal Val1, SVal Val2, 135 SVal BooleanArgVal = Call->getArgSVal(0); in modelAssertionResultBoolConstructor() 143 SVal ThisVal = Call->getCXXThisVal(); in modelAssertionResultBoolConstructor() 145 SVal ThisSuccess = getAssertionResultSuccessFieldValue( in modelAssertionResultBoolConstructor() 165 SVal OtherVal = Call->getArgSVal(0); in modelAssertionResultCopyConstructor() 166 SVal ThisVal = Call->getCXXThisVal(); in modelAssertionResultCopyConstructor() 171 SVal ThisSuccess = getAssertionResultSuccessFieldValue(AssertResultClassDecl, in modelAssertionResultCopyConstructor() 173 SVal OtherSuccess = getAssertionResultSuccessFieldValue(AssertResultClassDecl, in modelAssertionResultCopyConstructor() [all …]
|
| H A D | ContainerModeling.cpp | 35 void handleBegin(CheckerContext &C, const Expr *CE, SVal RetVal, 36 SVal Cont) const; 37 void handleEnd(CheckerContext &C, const Expr *CE, SVal RetVal, 38 SVal Cont) const; 39 void handleAssignment(CheckerContext &C, SVal Cont, const Expr *CE = nullptr, 40 SVal OldCont = UndefinedVal()) const; 41 void handleAssign(CheckerContext &C, SVal Cont, const Expr *ContE) const; 42 void handleClear(CheckerContext &C, SVal Cont, const Expr *ContE) const; 43 void handlePushBack(CheckerContext &C, SVal Cont, const Expr *ContE) const; 44 void handlePopBack(CheckerContext &C, SVal Cont, const Expr *ContE) const; [all …]
|
| H A D | ArrayBoundCheckerV2.cpp | 42 void checkLocation(SVal l, bool isLoad, const Stmt*S, 50 SVal byteOffset; 56 RegionRawOffsetV2(const SubRegion* base, SVal offset) in RegionRawOffsetV2() 64 SVal location); 71 static SVal computeExtentBegin(SValBuilder &svalBuilder, in computeExtentBegin() 116 void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, in checkLocation() 144 SVal extentBegin = computeExtentBegin(svalBuilder, rawOffset.getRegion()); in checkLocation() 156 SVal lowerBound = svalBuilder.evalBinOpNN(state, BO_LT, rawOffsetVal, *NV, in checkLocation() 194 SVal upperbound = svalBuilder.evalBinOpNN(state, BO_GE, rawOffsetVal, in checkLocation() 208 SVal ByteOffset = rawOffset.getByteOffset(); in checkLocation() [all …]
|
| H A D | CStringChecker.cpp | 201 ProgramStateRef state, SVal V, QualType Ty); 205 SVal strLength); 206 static SVal getCStringLengthForRegion(CheckerContext &C, 211 SVal getCStringLength(CheckerContext &C, 214 SVal Buf, 220 SVal val) const; 224 const Expr *Ex, SVal V, 231 static bool memsetAux(const Expr *DstBuffer, SVal CharE, 237 AnyArgExpr Arg, SVal l) const; 239 AnyArgExpr Buffer, SVal Element, [all …]
|
| H A D | MismatchedIteratorChecker.cpp | 35 void verifyMatch(CheckerContext &C, const SVal &Iter, 37 void verifyMatch(CheckerContext &C, const SVal &Iter1, 38 const SVal &Iter2) const; 39 void reportBug(const StringRef &Message, const SVal &Val1, 40 const SVal &Val2, CheckerContext &C, 42 void reportBug(const StringRef &Message, const SVal &Val, 170 SVal LHS = UndefinedVal(); in checkPreCall() 198 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt() 199 SVal RVal = State->getSVal(BO->getRHS(), C.getLocationContext()); in checkPreStmt() 203 void MismatchedIteratorChecker::verifyMatch(CheckerContext &C, const SVal &Iter, in verifyMatch() [all …]
|
| H A D | ObjCSelfInitChecker.cpp | 54 static bool isSelfVar(SVal location, CheckerContext &C); 74 void checkLocation(SVal location, bool isLoad, const Stmt *S, 76 void checkBind(SVal loc, SVal val, const Stmt *S, CheckerContext &C) const; 106 static SelfFlagEnum getSelfFlags(SVal val, ProgramStateRef state) { in REGISTER_MAP_WITH_PROGRAMSTATE() 113 static SelfFlagEnum getSelfFlags(SVal val, CheckerContext &C) { in getSelfFlags() 117 static void addSelfFlag(ProgramStateRef state, SVal val, in addSelfFlag() 126 static bool hasSelfFlag(SVal val, SelfFlagEnum flag, CheckerContext &C) { in hasSelfFlag() 134 SVal exprVal = C.getSVal(E); in isInvalidSelf() 185 SVal V = C.getSVal(Msg.getOriginExpr()); in checkPostObjCMessage() 252 SVal argV = CE.getArgSVal(i); in checkPreCall() [all …]
|
| H A D | TestAfterDivZeroChecker.cpp | 81 void reportBug(SVal Val, CheckerContext &C) const; 87 void setDivZeroMap(SVal Var, CheckerContext &C) const; 88 bool hasDivZeroMap(SVal Var, const CheckerContext &C) const; 89 bool isZero(SVal S, CheckerContext &C) const; 115 SVal S = Succ->getSVal(E); in REGISTER_SET_WITH_PROGRAMSTATE() 134 bool TestAfterDivZeroChecker::isZero(SVal S, CheckerContext &C) const { in isZero() 144 void TestAfterDivZeroChecker::setDivZeroMap(SVal Var, CheckerContext &C) const { in setDivZeroMap() 155 bool TestAfterDivZeroChecker::hasDivZeroMap(SVal Var, in hasDivZeroMap() 165 void TestAfterDivZeroChecker::reportBug(SVal Val, CheckerContext &C) const { in reportBug() 205 SVal S = C.getSVal(B->getRHS()); in checkPreStmt() [all …]
|
| H A D | InvalidatedIteratorChecker.cpp | 36 void verifyAccess(CheckerContext &C, const SVal &Val) const; 37 void reportBug(const StringRef &Message, const SVal &Val, 82 SVal SubVal = State->getSVal(UO->getSubExpr(), C.getLocationContext()); in checkPreStmt() 93 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt() 103 SVal LVal = State->getSVal(ASE->getLHS(), C.getLocationContext()); in checkPreStmt() 113 SVal BaseVal = State->getSVal(ME->getBase(), C.getLocationContext()); in checkPreStmt() 117 void InvalidatedIteratorChecker::verifyAccess(CheckerContext &C, const SVal &Val) const { in verifyAccess() 130 const SVal &Val, CheckerContext &C, in reportBug()
|
| /netbsd-src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Core/ |
| H A D | SimpleSValBuilder.cpp | 31 SVal evalMinus(NonLoc val) override; 32 SVal evalComplement(NonLoc val) override; 33 SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op, 35 SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op, 37 SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op, 42 const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal V) override; 46 SVal simplifySVal(ProgramStateRef State, SVal V) override; 48 SVal MakeSymIntVal(const SymExpr *LHS, BinaryOperator::Opcode op, 63 SVal SimpleSValBuilder::evalMinus(NonLoc val) { in evalMinus() 72 SVal SimpleSValBuilder::evalComplement(NonLoc X) { in evalComplement() [all …]
|
| H A D | RegionStore.cpp | 146 typedef llvm::ImmutableMap<BindingKey, SVal> ClusterBindings; 147 typedef llvm::ImmutableMapRef<BindingKey, SVal> ClusterBindingsRef; 148 typedef std::pair<BindingKey, SVal> BindingPair; 196 RegionBindingsRef addBinding(BindingKey K, SVal V) const; 199 BindingKey::Kind k, SVal V) const; 201 const SVal *lookup(BindingKey K) const; 202 const SVal *lookup(const MemRegion *R, BindingKey::Kind k) const; 215 Optional<SVal> getDirectBinding(const MemRegion *R) const; 219 Optional<SVal> getDefaultBinding(const MemRegion *R) const; 265 Optional<SVal> RegionBindingsRef::getDirectBinding(const MemRegion *R) const { in getDirectBinding() [all …]
|
| H A D | SValBuilder.cpp | 99 SVal SValBuilder::convertToArrayIndex(SVal val) { in convertToArrayIndex() 286 Optional<SVal> SValBuilder::getConstantVal(const Expr *E) { in getConstantVal() 356 Optional<SVal> Val = getConstantVal(SE); in getConstantVal() 386 SVal SValBuilder::makeSymExprValNN(BinaryOperator::Opcode Op, in makeSymExprValNN() 413 SVal SValBuilder::evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, in evalBinOp() 414 SVal lhs, SVal rhs, QualType type) { in evalBinOp() 454 ConditionTruthVal SValBuilder::areEqual(ProgramStateRef state, SVal lhs, in areEqual() 455 SVal rhs) { in areEqual() 459 SVal SValBuilder::evalEQ(ProgramStateRef state, SVal lhs, SVal rhs) { in evalEQ() 466 return evalEQ(state, static_cast<SVal>(lhs), static_cast<SVal>(rhs)) in evalEQ() [all …]
|
| H A D | Store.cpp | 229 static bool regionMatchesCXXRecordType(SVal V, QualType Ty) { in regionMatchesCXXRecordType() 249 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) { in evalDerivedToBase() 256 SVal Result = Derived; in evalDerivedToBase() 265 SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) { in evalDerivedToBase() 267 SVal Result = Derived; in evalDerivedToBase() 274 SVal StoreManager::evalDerivedToBase(SVal Derived, QualType BaseType, in evalDerivedToBase() 315 SVal StoreManager::attemptDownCast(SVal Base, QualType TargetType, in attemptDownCast() 397 SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) { in getLValueFieldOrIvar() 438 SVal StoreManager::getLValueIvar(const ObjCIvarDecl *decl, SVal base) { in getLValueIvar() 442 SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, in getLValueElement() [all …]
|
| H A D | ExprEngineC.cpp | 28 static SVal conjureOffsetSymbolOnLocation( in conjureOffsetSymbolOnLocation() 29 SVal Symbol, SVal Other, Expr* Expression, SValBuilder &svalBuilder, in conjureOffsetSymbolOnLocation() 58 SVal LeftV = state->getSVal(LHS, LCtx); in VisitBinaryOperator() 59 SVal RightV = state->getSVal(RHS, LCtx); in VisitBinaryOperator() 73 SVal ExprVal = B->isGLValue() ? LeftV : RightV; in VisitBinaryOperator() 100 SVal Result = evalBinOp(state, Op, LeftV, RightV, B->getType()); in VisitBinaryOperator() 133 SVal location = LeftV; in VisitBinaryOperator() 141 SVal V = state->getSVal(LHS, LCtx); in VisitBinaryOperator() 158 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy), in VisitBinaryOperator() 164 SVal LHSVal; in VisitBinaryOperator() [all …]
|
| H A D | SVals.cpp | 44 bool SVal::hasConjuredSymbol() const { in hasConjuredSymbol() 63 const FunctionDecl *SVal::getAsFunctionDecl() const { in getAsFunctionDecl() 85 SymbolRef SVal::getAsLocSymbol(bool IncludeBaseRegions) const { in getAsLocSymbol() 97 SymbolRef SVal::getLocSymbolInBase() const { in getLocSymbolInBase() 121 SymbolRef SVal::getAsSymbol(bool IncludeBaseRegions) const { in getAsSymbol() 129 const MemRegion *SVal::getAsRegion() const { in getAsRegion() 200 bool SVal::isConstant() const { in isConstant() 204 bool SVal::isConstant(int I) const { in isConstant() 212 bool SVal::isZeroConstant() const { in isZeroConstant() 220 SVal nonloc::ConcreteInt::evalBinOp(SValBuilder &svalBuilder, in evalBinOp() [all …]
|
| H A D | ProgramState.cpp | 118 SVal V, in bindLoc() 132 ProgramState::bindDefaultInitial(SVal loc, SVal V, in bindDefaultInitial() 142 ProgramState::bindDefaultZero(SVal loc, const LocationContext *LCtx) const { in bindDefaultZero() 151 typedef ArrayRef<SVal> ValueList; 161 SmallVector<SVal, 8> Values; in invalidateRegions() 243 SVal ProgramState::getSelfSVal(const LocationContext *LCtx) const { in getSelfSVal() 246 return SVal(); in getSelfSVal() 250 SVal ProgramState::getSValAsScalarOrLoc(const MemRegion *R) const { in getSValAsScalarOrLoc() 266 SVal ProgramState::getSVal(Loc location, QualType T) const { in getSVal() 267 SVal V = getRawSVal(location, T); in getSVal() [all …]
|
| H A D | BasicValueFactory.cpp | 33 llvm::ImmutableList<SVal> L) { in Profile() 52 using SValData = std::pair<SVal, uintptr_t>; 53 using SValPair = std::pair<SVal, SVal>; 127 llvm::ImmutableList<SVal> Vals) { in getCompoundValData() 344 const std::pair<SVal, uintptr_t>& 345 BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) { in getPersistentSValWithData() 369 const std::pair<SVal, SVal>& 370 BasicValueFactory::getPersistentSValPair(const SVal& V1, const SVal& V2) { in getPersistentSValPair() 394 const SVal* BasicValueFactory::getPersistentSVal(SVal X) { in getPersistentSVal()
|