| /freebsd-14.2/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | SVals.h | 55 class SVal { 78 explicit SVal() = default; 193 class UndefinedVal : public SVal { 195 UndefinedVal() : SVal(UndefinedValKind) {} in UndefinedVal() 199 class DefinedOrUnknownSVal : public SVal { 210 : SVal(Kind, Data) {} in SVal() function 236 class KnownSVal : public SVal { 238 /*implicit*/ KnownSVal(DefinedSVal V) : SVal(V) {} in KnownSVal() 239 /*implicit*/ KnownSVal(UndefinedVal V) : SVal(V) {} in KnownSVal() 255 static bool classof(SVal V) { in classof() [all …]
|
| H A D | Store.h | 114 SVal V) = 0; 144 virtual SVal getLValueIvar(const ObjCIvarDecl *decl, SVal base); 146 virtual SVal getLValueField(const FieldDecl *D, SVal Base) { in getLValueField() 150 virtual SVal getLValueElement(QualType elementType, NonLoc offset, SVal Base); 158 SVal evalDerivedToBase(SVal Derived, const CastExpr *Cast); 161 SVal evalDerivedToBase(SVal Derived, const CXXBasePath &CastPath); 164 SVal evalDerivedToBase(SVal Derived, QualType DerivedPtrType, 178 std::optional<SVal> evalBaseToDerived(SVal Base, QualType DerivedPtrType); 229 ArrayRef<SVal> Values, 273 SVal val) override; [all …]
|
| H A D | SValBuilder.h | 84 SVal evalCast(SVal V, QualType CastTy, QualType OriginalTy); 87 SVal evalIntegralCast(ProgramStateRef state, SVal val, QualType castTy, 90 SVal evalMinus(NonLoc val); 91 SVal evalComplement(NonLoc val); 124 virtual SVal simplifySVal(ProgramStateRef State, SVal Val) = 0; 127 SVal makeSymExprValNN(BinaryOperator::Opcode op, 131 SVal operand, QualType type); 134 SVal lhs, SVal rhs, QualType type); 137 ConditionTruthVal areEqual(ProgramStateRef state, SVal lhs, SVal rhs); 139 SVal evalEQ(ProgramStateRef state, SVal lhs, SVal rhs); [all …]
|
| H A D | ProgramState.h | 268 ConditionTruthVal areEqual(SVal Lhs, SVal Rhs) const; 288 [[nodiscard]] ProgramStateRef bindLoc(SVal location, SVal V, 298 bindDefaultInitial(SVal loc, SVal V, const LocationContext *LCtx) const; 362 SVal getLValue(const ObjCIvarDecl *decl, SVal base) const; 365 SVal getLValue(const FieldDecl *decl, SVal Base) const; 368 SVal getLValue(const IndirectFieldDecl *decl, SVal Base) const; 371 SVal getLValue(QualType ElementType, SVal Idx, SVal Base) const; 785 inline SVal ProgramState::getLValue(const FieldDecl *D, SVal Base) const { in getLValue() 799 inline SVal ProgramState::getLValue(QualType ElementType, SVal Idx, SVal Base) const{ in getLValue() 811 inline SVal [all …]
|
| H A D | BasicValueFactory.h | 42 llvm::ImmutableList<SVal> L; 49 using iterator = llvm::ImmutableList<SVal>::iterator; 57 llvm::ImmutableList<SVal> L); 124 llvm::ImmutableList<SVal>::Factory SValListFactory; 254 llvm::ImmutableList<SVal> getEmptySValList() { in getEmptySValList() 258 llvm::ImmutableList<SVal> prependSVal(SVal X, llvm::ImmutableList<SVal> L) { in prependSVal() 280 const std::pair<SVal, uintptr_t>& 281 getPersistentSValWithData(const SVal& V, uintptr_t Data); 283 const std::pair<SVal, SVal>& 284 getPersistentSValPair(const SVal& V1, const SVal& V2); [all …]
|
| H A D | ExprEngine.h | 610 SVal LHS, SVal RHS, QualType T) { in evalBinOp() 632 static std::optional<SVal> 639 ProgramStateRef State, ArrayRef<std::pair<SVal, SVal>> LocAndVals, 657 SVal location, SVal Val, bool atDeclInit = false, 662 SVal Loc, SVal Val, 683 SVal location, 690 ExplodedNode *Pred, ProgramStateRef St, SVal TargetLV, SVal Val, 746 std::pair<ProgramStateRef, SVal> handleConstructionContext( 769 SVal location, 838 SVal *ElementCountVal = nullptr); [all …]
|
| H A D | SVals.def | 1 //===-- SVals.def - Metadata about SVal kinds -------------------*- C++ -*-===// 9 // The list of symbolic values (SVal kinds) used in the Static Analyzer. 10 // The distinction between `loc::` and `nonloc::` SVal namespaces is 15 // BASIC_SVAL(Id, Parent) - for specific SVal kinds, which are 18 // ABSTRACT_SVAL(Id, Parent) - for abstract SVal classes which are 50 BASIC_SVAL(UndefinedVal, SVal) 51 ABSTRACT_SVAL(DefinedOrUnknownSVal, SVal)
|
| /freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | IteratorModeling.cpp | 94 SVal, SVal, SVal) const; 107 void handleIncrement(CheckerContext &C, SVal RetVal, SVal Iter, 109 void handleDecrement(CheckerContext &C, SVal RetVal, SVal Iter, 113 SVal Iterator, SVal Amount) const; 234 void IteratorModeling::checkBind(SVal Loc, SVal Val, const Stmt *S, in checkBind() 446 SVal RetVal, SVal LVal, SVal RVal, in handleComparison() 598 SVal Val; in handleRandomIncrOrDecr() 642 SVal NewVal; in handlePtrIncrOrDecr() 668 SVal RetVal, SVal Iter, in handleAdvance() 674 SVal RetVal, SVal Iter, SVal Amount) const { in handlePrev() [all …]
|
| H A D | IteratorRangeChecker.cpp | 38 void verifyDereference(CheckerContext &C, SVal Val) const; 39 void verifyIncrement(CheckerContext &C, SVal Iter) const; 40 void verifyDecrement(CheckerContext &C, SVal Iter) const; 42 SVal LHS, SVal RHS) const; 43 void verifyAdvance(CheckerContext &C, SVal LHS, SVal RHS) const; 44 void verifyPrev(CheckerContext &C, SVal LHS, SVal RHS) const; 45 void verifyNext(CheckerContext &C, SVal LHS, SVal RHS) const; 217 SVal LHS, SVal RHS) const { in verifyRandomIncrOrDecr() 258 SVal RHS) const { in verifyAdvance() 263 SVal RHS) const { in verifyPrev() [all …]
|
| H A D | GTestChecker.cpp | 112 SVal 114 SVal Instance, 117 static ProgramStateRef assumeValuesEqual(SVal Val1, SVal Val2, 134 SVal BooleanArgVal = Call->getArgSVal(0); in modelAssertionResultBoolConstructor() 142 SVal ThisVal = Call->getCXXThisVal(); in modelAssertionResultBoolConstructor() 144 SVal ThisSuccess = getAssertionResultSuccessFieldValue( in modelAssertionResultBoolConstructor() 164 SVal OtherVal = Call->getArgSVal(0); in modelAssertionResultCopyConstructor() 165 SVal ThisVal = Call->getCXXThisVal(); in modelAssertionResultCopyConstructor() 248 SVal GTestChecker::getAssertionResultSuccessFieldValue( in getAssertionResultSuccessFieldValue() 249 const CXXRecordDecl *AssertionResultDecl, SVal Instance, in getAssertionResultSuccessFieldValue() [all …]
|
| H A D | ContainerModeling.cpp | 39 SVal Cont) const; 48 void handleInsert(CheckerContext &C, SVal Cont, SVal Iter) const; 49 void handleErase(CheckerContext &C, SVal Cont, SVal Iter) const; 50 void handleErase(CheckerContext &C, SVal Cont, SVal Iter1, SVal Iter2) const; 51 void handleEraseAfter(CheckerContext &C, SVal Cont, SVal Iter) const; 52 void handleEraseAfter(CheckerContext &C, SVal Cont, SVal Iter1, 71 using TwoItParamFn = void (ContainerModeling::*)(CheckerContext &, SVal, SVal, 246 SVal RetVal, SVal Cont) const { in handleBegin() 268 SVal RetVal, SVal Cont) const { in handleEnd() 624 void ContainerModeling::handleErase(CheckerContext &C, SVal Cont, SVal Iter1, in handleErase() [all …]
|
| H A D | MismatchedIteratorChecker.cpp | 38 void verifyMatch(CheckerContext &C, SVal Iter1, SVal Iter2) const; 39 void reportBug(StringRef Message, SVal Val1, SVal Val2, CheckerContext &C, 41 void reportBug(StringRef Message, SVal Val, const MemRegion *Reg, 160 SVal LHS = UndefinedVal(); in checkPreCall() 190 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt() 191 SVal RVal = State->getSVal(BO->getRHS(), C.getLocationContext()); in checkPreStmt() 195 void MismatchedIteratorChecker::verifyMatch(CheckerContext &C, SVal Iter, in verifyMatch() 232 SVal Iter2) const { in verifyMatch() 269 void MismatchedIteratorChecker::reportBug(StringRef Message, SVal Val1, in reportBug() 270 SVal Val2, CheckerContext &C, in reportBug() [all …]
|
| H A D | CStringChecker.cpp | 251 const Expr *BufE, SVal BufV, SVal SizeV, 322 SVal BufVal, QualType BufTy, SVal LengthVal, 480 SVal BufStart = in CheckBufferAccess() 506 SVal BufEnd = in CheckBufferAccess() 572 SVal reverse = in CheckOverlap() 603 SVal FirstStart = in CheckOverlap() 617 SVal Overlap = in CheckOverlap() 775 SVal maxMinusRight; in checkAdditionOverflow() 2016 SVal Result; in evalStrcpyCommon() 2302 SVal Result; in evalStrsep() [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; 113 static SelfFlagEnum getSelfFlags(SVal val, CheckerContext &C) { in getSelfFlags() 117 static void addSelfFlag(ProgramStateRef state, SVal val, in addSelfFlag() 135 SVal exprVal = C.getSVal(E); in isInvalidSelf() 183 SVal V = C.getSVal(Msg.getOriginExpr()); in checkPostObjCMessage() 250 SVal argV = CE.getArgSVal(i); in checkPreCall() 279 SVal argV = CE.getArgSVal(i); in checkPostCall() 315 void ObjCSelfInitChecker::checkBind(SVal loc, SVal val, const Stmt *S, in checkBind() [all …]
|
| H A D | TestAfterDivZeroChecker.cpp | 82 void reportBug(SVal Val, CheckerContext &C) const; 88 void setDivZeroMap(SVal Var, CheckerContext &C) const; 89 bool hasDivZeroMap(SVal Var, const CheckerContext &C) const; 90 bool isZero(SVal S, CheckerContext &C) const; 116 SVal S = Succ->getSVal(E); in REGISTER_SET_WITH_PROGRAMSTATE() 156 bool TestAfterDivZeroChecker::hasDivZeroMap(SVal Var, in hasDivZeroMap() 201 SVal S = C.getSVal(B->getRHS()); in checkPreStmt() 222 SVal Val = C.getSVal(LRHS ? B->getLHS() : B->getRHS()); in checkBranchCondition() 228 SVal Val; in checkBranchCondition() 243 SVal Val = C.getSVal(IE->getSubExpr()); in checkBranchCondition() [all …]
|
| H A D | InvalidatedIteratorChecker.cpp | 37 void verifyAccess(CheckerContext &C, SVal Val) const; 38 void reportBug(StringRef Message, SVal Val, CheckerContext &C, 77 SVal SubVal = State->getSVal(UO->getSubExpr(), C.getLocationContext()); in checkPreStmt() 88 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt() 98 SVal LVal = State->getSVal(ASE->getLHS(), C.getLocationContext()); in checkPreStmt() 108 SVal BaseVal = State->getSVal(ME->getBase(), C.getLocationContext()); in checkPreStmt() 113 SVal Val) const { in verifyAccess() 125 void InvalidatedIteratorChecker::reportBug(StringRef Message, SVal Val, in reportBug()
|
| /freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
| H A D | SimpleSValBuilder.cpp | 57 SVal simplifyUntilFixpoint(ProgramStateRef State, SVal Val); 63 SVal simplifySValOnce(ProgramStateRef State, SVal V); 93 SVal simplifySVal(ProgramStateRef State, SVal V) override; 237 SVal Result = in isInRelation() 1088 SVal Result = lhs; in evalBinOpLN() 1249 SVal SimpleSValBuilder::simplifyUntilFixpoint(ProgramStateRef State, SVal Val) { in simplifyUntilFixpoint() 1258 SVal SimpleSValBuilder::simplifySVal(ProgramStateRef State, SVal V) { in simplifySVal() 1262 SVal SimpleSValBuilder::simplifySValOnce(ProgramStateRef State, SVal V) { in simplifySValOnce() 1281 SVal cache(SymbolRef Sym, SVal V) { in simplifySValOnce() 1330 SVal RHS; in simplifySValOnce() [all …]
|
| H A D | RegionStore.cpp | 267 std::optional<SVal> 273 std::optional<SVal> 430 std::optional<SVal> 433 std::optional<SVal> 596 std::optional<SVal> 1283 for (SVal V : Values) { in populateWorkList() 1669 static std::optional<SVal> 2019 SVal val = *D; in getBindingForDerivedDefaultValue() 2042 SVal Result; in getLazyBinding() 2069 SVal [all …]
|
| H A D | Store.cpp | 232 static bool regionMatchesCXXRecordType(SVal V, QualType Ty) { in regionMatchesCXXRecordType() 252 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) { in evalDerivedToBase() 259 SVal Result = Derived; in evalDerivedToBase() 266 SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) { in evalDerivedToBase() 268 SVal Result = Derived; in evalDerivedToBase() 275 SVal StoreManager::evalDerivedToBase(SVal Derived, QualType BaseType, in evalDerivedToBase() 316 std::optional<SVal> StoreManager::evalBaseToDerived(SVal Base, in evalBaseToDerived() 398 SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) { in getLValueFieldOrIvar() 439 SVal StoreManager::getLValueIvar(const ObjCIvarDecl *decl, SVal base) { in getLValueIvar() 444 SVal Base) { in getLValueElement() [all …]
|
| H A D | ExprEngineC.cpp | 30 SVal Symbol, SVal Other, Expr* Expression, SValBuilder &svalBuilder, in conjureOffsetSymbolOnLocation() 133 SVal location = LeftV; in VisitBinaryOperator() 162 SVal LHSVal; in VisitBinaryOperator() 232 SVal originalV; in VisitBlockExpr() 510 SVal CastedPTMSV = in VisitCast() 693 SVal X; in VisitLogicalExpr() 772 SVal V; in VisitInitListExpr() 815 SVal V; in VisitGuardedExpr() 1033 SVal Result; in VisitUnaryOperator() 1099 SVal RHS; in VisitIncrementDecrementOperator() [all …]
|
| H A D | SValBuilder.cpp | 121 SVal SValBuilder::convertToArrayIndex(SVal val) { in convertToArrayIndex() 456 SVal SValBuilder::evalMinus(NonLoc X) { in evalMinus() 468 SVal SValBuilder::evalComplement(NonLoc X) { in evalComplement() 494 SVal lhs, SVal rhs, QualType type) { in evalBinOp() 548 SVal SValBuilder::evalEQ(ProgramStateRef state, SVal lhs, SVal rhs) { in evalEQ() 555 return evalEQ(state, static_cast<SVal>(lhs), static_cast<SVal>(rhs)) in evalEQ() 595 SVal SValBuilder::evalIntegralCast(ProgramStateRef state, SVal val, in evalIntegralCast() 644 SVal Visit(SVal V) { in Visit() 691 SVal VisitGotoLabel(loc::GotoLabel V) { in VisitGotoLabel() 755 SVal Val = V; in VisitMemRegionVal() [all …]
|
| H A D | SVals.cpp | 46 const FunctionDecl *SVal::getAsFunctionDecl() const { in getAsFunctionDecl() 68 SymbolRef SVal::getAsLocSymbol(bool IncludeBaseRegions) const { in getAsLocSymbol() 80 SymbolRef SVal::getLocSymbolInBase() const { in getLocSymbolInBase() 104 SymbolRef SVal::getAsSymbol(bool IncludeBaseRegions) const { in getAsSymbol() 112 const llvm::APSInt *SVal::getAsInteger() const { in getAsInteger() 120 const MemRegion *SVal::getAsRegion() const { in getAsRegion() 181 QualType SVal::getType(const ASTContext &Context) const { in getType() 246 bool SVal::isConstant() const { in isConstant() 250 bool SVal::isConstant(int I) const { in isConstant() 258 bool SVal::isZeroConstant() const { in isZeroConstant() [all …]
|
| H A D | ProgramState.cpp | 115 SVal V, in bindLoc() 129 ProgramState::bindDefaultInitial(SVal loc, SVal V, in bindDefaultInitial() 148 typedef ArrayRef<SVal> ValueList; 158 SmallVector<SVal, 8> Values; in invalidateRegions() 240 return SVal(); in getSelfSVal() 261 SVal V = getRawSVal(location, T); in getSVal() 336 SVal newIdx = svalBuilder.evalBinOpNN(this, BO_Add, in assumeInBoundDual() 342 SVal newBound = in assumeInBoundDual() 376 ConditionTruthVal ProgramState::areEqual(SVal Lhs, SVal Rhs) const { in areEqual() 558 for (SVal V : val) in scan() [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>; 126 llvm::ImmutableList<SVal> Vals) { in getCompoundValData() 332 const std::pair<SVal, uintptr_t>& 333 BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) { in getPersistentSValWithData() 356 const std::pair<SVal, SVal>& 357 BasicValueFactory::getPersistentSValPair(const SVal& V1, const SVal& V2) { in getPersistentSValPair() 380 const SVal* BasicValueFactory::getPersistentSVal(SVal X) { in getPersistentSVal()
|
| H A D | ExprEngineCXX.cpp | 46 SVal ThisVal; in performTrivialCopy() 76 SVal V = Call.getArgSVal(0); in performTrivialCopy() 100 SVal ExprEngine::makeElementRegion(ProgramStateRef State, SVal LValue, in makeElementRegion() 162 SVal FieldVal; in computeObjectUnderConstruction() 569 SVal Base = UnknownVal(); in bindRequiredArrayElementToEnvironment() 592 SVal Target = UnknownVal(); in handleConstructor() 713 SVal BaseVal = in handleConstructor() 1004 SVal symVal = UnknownVal(); in VisitCXXNewExpr() 1057 SVal Result = symVal; in VisitCXXNewExpr() 1190 SVal V = loc::MemRegionVal(R); in VisitLambdaExpr() [all …]
|