Home
last modified time | relevance | path

Searched refs:SVal (Results 1 – 25 of 145) sorted by relevance

123456

/llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
H A DStore.h113 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);
157 SVal evalDerivedToBase(SVal Derived, const CastExpr *Cast);
160 SVal evalDerivedToBase(SVal Derived, const CXXBasePath &CastPath);
163 SVal evalDerivedToBase(SVal Derived, QualType DerivedPtrType,
177 Optional<SVal> evalBaseToDerived(SVal Base, QualType DerivedPtrType);
228 ArrayRef<SVal> Values,
272 SVal val) override;
[all …]
H A DSVals.h73 class SVal {
96 explicit SVal() = default;
119 bool operator==(SVal R) const {
259 class KnownSVal : public SVal {
322 static bool classof(SVal V) { in classof()
338 static bool classof(SVal V) { in classof()
370 static bool classof(SVal V) { in classof()
395 static bool classof(SVal V) { in classof()
422 static bool classof(SVal V) { in classof()
467 static bool classof(SVal V) { in classof()
[all …]
H A DSValBuilder.h84 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);
116 virtual SVal simplifySVal(ProgramStateRef State, SVal Val) = 0;
123 SVal operand, QualType type);
126 SVal lhs, SVal rhs, QualType type);
129 ConditionTruthVal areEqual(ProgramStateRef state, SVal lhs, SVal rhs);
131 SVal evalEQ(ProgramStateRef state, SVal lhs, SVal rhs);
239 Optional<SVal> getConstantVal(const Expr *E);
[all …]
H A DProgramState.h267 ConditionTruthVal areEqual(SVal Lhs, SVal Rhs) const;
287 LLVM_NODISCARD ProgramStateRef bindLoc(SVal location, SVal V,
297 bindDefaultInitial(SVal loc, SVal V, const LocationContext *LCtx) const;
360 SVal getLValue(const ObjCIvarDecl *decl, SVal base) const;
363 SVal getLValue(const FieldDecl *decl, SVal Base) const;
366 SVal getLValue(const IndirectFieldDecl *decl, SVal Base) const;
369 SVal getLValue(QualType ElementType, SVal Idx, SVal Base) const;
783 inline SVal ProgramState::getLValue(const FieldDecl *D, SVal Base) const { in getLValue()
797 inline SVal ProgramState::getLValue(QualType ElementType, SVal Idx, SVal Base) const{ in getLValue()
809 inline SVal
[all …]
H A DBasicValueFactory.h42 llvm::ImmutableList<SVal> L;
49 using iterator = llvm::ImmutableList<SVal>::iterator;
57 llvm::ImmutableList<SVal> L);
124 llvm::ImmutableList<SVal>::Factory SValListFactory;
248 llvm::ImmutableList<SVal> getEmptySValList() { in getEmptySValList()
252 llvm::ImmutableList<SVal> prependSVal(SVal X, llvm::ImmutableList<SVal> L) { in prependSVal()
274 const std::pair<SVal, uintptr_t>&
275 getPersistentSValWithData(const SVal& V, uintptr_t Data);
277 const std::pair<SVal, SVal>&
278 getPersistentSValPair(const SVal& V1, const SVal& V2);
[all …]
H A DExprEngine.h616 SVal LHS, SVal RHS, QualType T) { in evalBinOp()
633 static Optional<SVal>
640 ProgramStateRef State, ArrayRef<std::pair<SVal, SVal>> LocAndVals,
658 SVal location, SVal Val, bool atDeclInit = false,
663 SVal Loc, SVal Val,
684 SVal location,
691 ExplodedNode *Pred, ProgramStateRef St, SVal TargetLV, SVal Val,
746 std::pair<ProgramStateRef, SVal>
769 SVal location,
778 SVal location,
[all …]
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DIteratorModeling.cpp93 SVal, SVal, SVal) const;
102 const SVal &LVal, const SVal &RVal,
118 void handlePrev(CheckerContext &C, const Expr *CE, SVal RetVal, SVal Iter,
120 void handleNext(CheckerContext &C, const Expr *CE, SVal RetVal, SVal Iter,
234 void IteratorModeling::checkBind(SVal Loc, SVal Val, const Stmt *S, in checkBind()
449 SVal RetVal, const SVal &LVal, in handleComparison()
603 SVal Val; in handleRandomIncrOrDecr()
647 SVal NewVal; in handlePtrIncrOrDecr()
673 SVal RetVal, SVal Iter, in handleAdvance()
679 SVal RetVal, SVal Iter, SVal Amount) const { in handlePrev()
[all …]
H A DIteratorRangeChecker.cpp37 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;
223 SVal LHS, SVal RHS) const { in verifyRandomIncrOrDecr()
264 SVal RHS) const { in verifyAdvance()
269 SVal RHS) const { in verifyPrev()
[all …]
H A DGTestChecker.cpp111 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()
249 SVal GTestChecker::getAssertionResultSuccessFieldValue( in getAssertionResultSuccessFieldValue()
250 const CXXRecordDecl *AssertionResultDecl, SVal Instance, in getAssertionResultSuccessFieldValue()
[all …]
H A DArrayBoundCheckerV2.cpp42 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()
207 SVal ByteOffset = rawOffset.getByteOffset(); in checkLocation()
276 static inline SVal getValue(SVal val, SValBuilder &svalBuilder) { in getValue()
282 static inline SVal scaleValue(ProgramStateRef state, in scaleValue()
292 static SVal addValue(ProgramStateRef state, SVal x, SVal y, in addValue()
311 SVal offset = UndefinedVal(); in computeOffset()
[all …]
H A DContainerModeling.cpp39 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 DMismatchedIteratorChecker.cpp35 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()
240 const SVal &Iter1, in verifyMatch()
279 const SVal &Val1, in reportBug()
[all …]
H A DCStringChecker.cpp457 SVal BufStart = in CheckBufferAccess()
461 SVal BufEnd = in CheckBufferAccess()
527 SVal reverse = in CheckOverlap()
558 SVal FirstStart = in CheckOverlap()
572 SVal Overlap = in CheckOverlap()
727 SVal maxMinusRight; in checkAdditionOverflow()
973 SVal BufEnd = in IsFirstBufInBound()
1252 SVal DestRegCharVal = in evalCopyCommon()
1896 SVal Result; in evalStrcpyCommon()
1921 SVal maxLastElement = in evalStrcpyCommon()
[all …]
H A DObjCSelfInitChecker.cpp54 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()
186 SVal V = C.getSVal(Msg.getOriginExpr()); in checkPostObjCMessage()
253 SVal argV = CE.getArgSVal(i); in checkPreCall()
282 SVal argV = CE.getArgSVal(i); in checkPostCall()
318 void ObjCSelfInitChecker::checkBind(SVal loc, SVal val, const Stmt *S, in checkBind()
[all …]
H A DTestAfterDivZeroChecker.cpp81 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()
155 bool TestAfterDivZeroChecker::hasDivZeroMap(SVal Var, in hasDivZeroMap()
205 SVal S = C.getSVal(B->getRHS()); in checkPreStmt()
226 SVal Val = C.getSVal(LRHS ? B->getLHS() : B->getRHS()); in checkBranchCondition()
232 SVal Val; in checkBranchCondition()
247 SVal Val = C.getSVal(IE->getSubExpr()); in checkBranchCondition()
[all …]
H A DInvalidatedIteratorChecker.cpp36 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()
/llvm-project-15.0.7/clang/unittests/StaticAnalyzer/
H A DSValTest.cpp64 void checkBind(SVal Loc, SVal Val, const Stmt *S, CheckerContext &C) const { in checkBind()
166 SVal X = getByName("x");
170 SVal Y = getByName("y");
175 SVal Z = getByName("z");
186 SVal A = getByName("a");
193 SVal B = getByName("b");
197 SVal C = getByName("c");
210 SVal X = getByName("x");
214 SVal Y = getByName("y");
219 SVal Z = getByName("z");
[all …]
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DSimpleSValBuilder.cpp52 SVal simplifyUntilFixpoint(ProgramStateRef State, SVal Val);
58 SVal simplifySValOnce(ProgramStateRef State, SVal V);
78 SVal simplifySVal(ProgramStateRef State, SVal V) override;
222 SVal Result = in isInRelation()
1061 SVal Result = lhs; in evalBinOpLN()
1190 SVal SimpleSValBuilder::simplifyUntilFixpoint(ProgramStateRef State, SVal Val) { in simplifyUntilFixpoint()
1199 SVal SimpleSValBuilder::simplifySVal(ProgramStateRef State, SVal V) { in simplifySVal()
1203 SVal SimpleSValBuilder::simplifySValOnce(ProgramStateRef State, SVal V) { in simplifySValOnce()
1222 SVal cache(SymbolRef Sym, SVal V) { in simplifySValOnce()
1271 SVal RHS; in simplifySValOnce()
[all …]
H A DRegionStore.cpp424 Optional<SVal>
427 Optional<SVal>
998 void VisitBinding(SVal V);
1289 SVal V = *I; in populateWorkList()
1681 static Optional<SVal>
2021 Optional<SVal>
2028 const SVal &val = *D; in getBindingForDerivedDefaultValue()
2051 SVal Result; in getLazyBinding()
2078 SVal
2282 SVal V = I->second; in getInterestingValues()
[all …]
H A DStore.cpp231 static bool regionMatchesCXXRecordType(SVal V, QualType Ty) { in regionMatchesCXXRecordType()
251 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) { in evalDerivedToBase()
258 SVal Result = Derived; in evalDerivedToBase()
267 SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) { in evalDerivedToBase()
269 SVal Result = Derived; in evalDerivedToBase()
276 SVal StoreManager::evalDerivedToBase(SVal Derived, QualType BaseType, in evalDerivedToBase()
317 Optional<SVal> StoreManager::evalBaseToDerived(SVal Base, QualType TargetType) { 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 DExprEngineC.cpp29 SVal Symbol, SVal Other, Expr* Expression, SValBuilder &svalBuilder, in conjureOffsetSymbolOnLocation()
132 SVal location = LeftV; in VisitBinaryOperator()
163 SVal LHSVal; in VisitBinaryOperator()
236 SVal originalV; in VisitBlockExpr()
518 SVal CastedPTMSV = in VisitCast()
701 SVal X; in VisitLogicalExpr()
780 SVal V; in VisitInitListExpr()
823 SVal V; in VisitGuardedExpr()
1045 SVal Result; in VisitUnaryOperator()
1113 SVal RHS; in VisitIncrementDecrementOperator()
[all …]
H A DSValBuilder.cpp122 SVal SValBuilder::convertToArrayIndex(SVal val) { in convertToArrayIndex()
447 SVal SValBuilder::evalMinus(NonLoc X) { in evalMinus()
459 SVal SValBuilder::evalComplement(NonLoc X) { in evalComplement()
485 SVal lhs, SVal rhs, QualType type) { in evalBinOp()
539 SVal SValBuilder::evalEQ(ProgramStateRef state, SVal lhs, SVal rhs) { in evalEQ()
546 return evalEQ(state, static_cast<SVal>(lhs), static_cast<SVal>(rhs)) in evalEQ()
586 SVal SValBuilder::evalIntegralCast(ProgramStateRef state, SVal val, in evalIntegralCast()
637 SVal Visit(SVal V) { in Visit()
684 SVal VisitLocGotoLabel(loc::GotoLabel V) { in VisitLocGotoLabel()
748 SVal Val = V; in VisitLocMemRegionVal()
[all …]
H A DSVals.cpp46 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()
184 QualType SVal::getType(const ASTContext &Context) const { in getType()
249 bool SVal::isConstant() const { in isConstant()
253 bool SVal::isConstant(int I) const { in isConstant()
261 bool SVal::isZeroConstant() const { in isZeroConstant()
[all …]
/llvm-project-15.0.7/cross-project-tests/debuginfo-tests/dexter-tests/
H A Daggregate-indirect-arg.cpp9 class SVal { class
11 ~SVal() {} in ~SVal()
16 void bar(SVal &v) {} in bar()
19 void foo(SVal v) { bar(v); } // DexLabel('foo') in foo()
23 SVal v; in main()
/llvm-project-15.0.7/llvm/test/CodeGen/ARM/
H A D2010-08-04-StackVariable.ll6 %struct.SVal = type { i8*, i32 }
8 define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) #0 !dbg !4 {
15 …call void @llvm.dbg.value(metadata %struct.SVal* %location, metadata !23, metadata !DIExpression()…
20 %tmp1 = getelementptr inbounds %struct.SVal, %struct.SVal* %location, i32 0, i32 1, !dbg !27
26 %tmp4 = getelementptr inbounds %struct.SVal, %struct.SVal* %location, i32 0, i32 1, !dbg !28
56 !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "SVal", file: !1, line: 1, size: 64, align:…
62 !14 = !DISubprogram(name: "SVal", scope: !8, file: !1, line: 11, type: !15, virtualIndex: 6, spFlag…
66 !18 = !DISubprogram(name: "~SVal", scope: !8, file: !1, line: 12, type: !19, virtualIndex: 6, spFla…
72 !24 = !DIDerivedType(tag: DW_TAG_reference_type, name: "SVal", scope: !1, file: !1, baseType: !8, s…

123456