/external/clang/lib/StaticAnalyzer/Checkers/ |
D | ArrayBoundCheckerV2.cpp | 60 SValBuilder &svalBuilder, 68 static SVal computeExtentBegin(SValBuilder &svalBuilder, in computeExtentBegin() argument 73 return svalBuilder.makeZeroArrayIndex(); in computeExtentBegin() 100 SValBuilder &svalBuilder = checkerContext.getSValBuilder(); in checkLocation() local 102 RegionRawOffsetV2::computeOffset(state, svalBuilder, location); in checkLocation() 111 SVal extentBegin = computeExtentBegin(svalBuilder, rawOffset.getRegion()); in checkLocation() 115 svalBuilder.evalBinOpNN(state, BO_LT, rawOffset.getByteOffset(), *NV, in checkLocation() 116 svalBuilder.getConditionType()); in checkLocation() 141 rawOffset.getRegion()->getExtent(svalBuilder); in checkLocation() 146 = svalBuilder.evalBinOpNN(state, BO_GE, rawOffset.getByteOffset(), in checkLocation() [all …]
|
D | BoolAssignmentChecker.cpp | 80 SValBuilder &svalBuilder = C.getSValBuilder(); in checkBind() local 84 DefinedSVal zeroVal = svalBuilder.makeIntVal(0, valTy); in checkBind() 86 svalBuilder.evalBinOp(state, BO_GE, *DV, zeroVal, in checkBind() 87 svalBuilder.getConditionType()); in checkBind() 120 DefinedSVal OneVal = svalBuilder.makeIntVal(1, valTy); in checkBind() 122 svalBuilder.evalBinOp(state, BO_LE, *DV, OneVal, in checkBind() 123 svalBuilder.getConditionType()); in checkBind()
|
D | CStringChecker.cpp | 213 SValBuilder &svalBuilder = C.getSValBuilder(); in REGISTER_MAP_WITH_PROGRAMSTATE() local 214 DefinedOrUnknownSVal zero = svalBuilder.makeZeroVal(Ty); in REGISTER_MAP_WITH_PROGRAMSTATE() 215 return state->assume(svalBuilder.evalEQ(state, *val, zero)); in REGISTER_MAP_WITH_PROGRAMSTATE() 284 SValBuilder &svalBuilder = C.getSValBuilder(); in CheckLocation() local 286 svalBuilder.convertToArrayIndex(superReg->getExtent(svalBuilder)); in CheckLocation() 348 SValBuilder &svalBuilder = C.getSValBuilder(); in CheckBufferAccess() local 349 ASTContext &Ctx = svalBuilder.getContext(); in CheckBufferAccess() 374 NonLoc One = svalBuilder.makeIntVal(1, sizeTy).castAs<NonLoc>(); in CheckBufferAccess() 375 NonLoc LastOffset = svalBuilder in CheckBufferAccess() 379 SVal BufStart = svalBuilder.evalCast(BufVal, PtrTy, FirstBuf->getType()); in CheckBufferAccess() [all …]
|
D | VLASizeChecker.cpp | 132 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local 135 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt() 139 SVal EleSizeVal = svalBuilder.makeIntVal(EleSize.getQuantity(), SizeTy); in checkPreStmt() 142 SVal ArraySizeVal = svalBuilder.evalBinOpNN( in checkPreStmt() 148 state->getRegion(VD, LC)->getExtent(svalBuilder); in checkPreStmt() 151 svalBuilder.evalEQ(state, Extent, ArraySize); in checkPreStmt()
|
D | BuiltinFunctionChecker.cpp | 67 SValBuilder& svalBuilder = C.getSValBuilder(); in evalCall() local 68 DefinedOrUnknownSVal Extent = R->getExtent(svalBuilder); in evalCall() 70 svalBuilder.evalEQ(state, Extent, Size); in evalCall()
|
D | CastSizeChecker.cpp | 115 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local 116 SVal extent = SR->getExtent(svalBuilder); in checkPreStmt() 117 const llvm::APSInt *extentInt = svalBuilder.getKnownValue(state, extent); in checkPreStmt()
|
D | MallocChecker.cpp | 866 SValBuilder &svalBuilder = C.getSValBuilder(); in MallocMemAux() local 868 DefinedSVal RetVal = svalBuilder.getConjuredHeapSymbolVal(CE, LCtx, Count) in MallocMemAux() 886 SValBuilder &svalBuilder = C.getSValBuilder(); in MallocMemAux() local 887 DefinedOrUnknownSVal Extent = R->getExtent(svalBuilder); in MallocMemAux() 889 svalBuilder.evalEQ(State, Extent, *DefinedSize); in MallocMemAux() 1587 SValBuilder &svalBuilder = C.getSValBuilder(); in ReallocMem() local 1590 svalBuilder.evalEQ(state, arg0Val, svalBuilder.makeNull()); in ReallocMem() 1605 svalBuilder.evalEQ(state, Arg1Val, in ReallocMem() 1606 svalBuilder.makeIntValWithPtrWidth(0, false)); in ReallocMem() 1680 SValBuilder &svalBuilder = C.getSValBuilder(); in CallocMem() local [all …]
|
D | StreamChecker.cpp | 213 SValBuilder &svalBuilder = C.getSValBuilder(); in OpenFileAux() local 215 DefinedSVal RetVal = svalBuilder.conjureSymbolVal(nullptr, CE, LCtx, in OpenFileAux()
|
D | BasicObjCFoundationChecks.cpp | 580 SValBuilder &svalBuilder = C.getSValBuilder(); in checkPreStmt() local 582 svalBuilder.makeZeroVal(Arg->getType()).castAs<DefinedSVal>(); in checkPreStmt() 585 DefinedOrUnknownSVal ArgIsNull = svalBuilder.evalEQ(state, zero, *DefArgVal); in checkPreStmt()
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | ExprEngineC.cpp | 50 RightV = svalBuilder.conjureSymbolVal(nullptr, B->getRHS(), LCtx, in VisitBinaryOperator() 74 RightV = svalBuilder.conjureSymbolVal(RHS, LCtx, RHS->getType(), in VisitBinaryOperator() 80 LeftV = svalBuilder.conjureSymbolVal(LHS, LCtx, LHS->getType(), in VisitBinaryOperator() 146 V = svalBuilder.evalCast(V, CLHSTy, LTy); in VisitBinaryOperator() 149 SVal Result = svalBuilder.evalCast(evalBinOp(state, Op, V, RightV, CTy), in VisitBinaryOperator() 161 LHSVal = svalBuilder.conjureSymbolVal(nullptr, B->getRHS(), LCtx, LTy, in VisitBinaryOperator() 164 Result = svalBuilder.evalCast(LHSVal, CTy, LTy); in VisitBinaryOperator() 169 LHSVal = svalBuilder.evalCast(Result, LTy, CTy); in VisitBinaryOperator() 193 SVal V = svalBuilder.getBlockPointer(BE->getBlockDecl(), T, in VisitBlockExpr() 325 V = svalBuilder.evalCast(V, T, ExTy); in VisitCast() [all …]
|
D | Store.cpp | 25 : svalBuilder(stateMgr.getSValBuilder()), StateMgr(stateMgr), in StoreManager() 26 MRMgr(svalBuilder.getRegionManager()), Ctx(stateMgr.getContext()) {} in StoreManager() 47 NonLoc idx = svalBuilder.makeArrayIndex(index); in MakeElementRegion() 48 return MRMgr.getElementRegion(EleTy, idx, Base, svalBuilder.getContext()); in MakeElementRegion() 68 NonLoc idx = svalBuilder.makeZeroArrayIndex(); in GetElementZeroRegion() 384 ASTContext &Ctx = svalBuilder.getContext(); in CastRetrievedVal() 392 assert(svalBuilder.getContext().hasSameUnqualifiedType(castTy, T)); in CastRetrievedVal() 396 return svalBuilder.dispatchCast(V, castTy); in CastRetrievedVal() 454 Offset = svalBuilder.convertToArrayIndex(Offset).castAs<NonLoc>(); in getLValueElement() 494 nonloc::ConcreteInt NewIdx(svalBuilder.getBasicValueFactory().getValue(BaseIdxI + in getLValueElement()
|
D | SVals.cpp | 195 SVal nonloc::ConcreteInt::evalBinOp(SValBuilder &svalBuilder, in evalBinOp() argument 199 svalBuilder.getBasicValueFactory().evalAPSInt(Op, getValue(), R.getValue()); in evalBinOp() 208 nonloc::ConcreteInt::evalComplement(SValBuilder &svalBuilder) const { in evalComplement() 209 return svalBuilder.makeIntVal(~getValue()); in evalComplement() 213 nonloc::ConcreteInt::evalMinus(SValBuilder &svalBuilder) const { in evalMinus() 214 return svalBuilder.makeIntVal(-getValue()); in evalMinus()
|
D | RegionStore.cpp | 654 SValBuilder &svalBuilder; member in __anonc04f3a860611::ClusterAnalysis 685 svalBuilder(StateMgr.getSValBuilder()), in ClusterAnalysis() 916 collectSubRegionBindings(Bindings, svalBuilder, *Cluster, Top, TopKey, in removeSubRegionBindings() 1051 svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, Ctx.IntTy, Count); in VisitCluster() 1072 DefinedOrUnknownSVal V = svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, in VisitCluster() 1081 svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, in VisitCluster() 1087 DefinedOrUnknownSVal V = svalBuilder.conjureSymbolVal(baseR, Ex, LCtx, in VisitCluster() 1103 SVal V = svalBuilder.conjureSymbolVal(/* SymbolTag = */ (const void*) GS, Ex, LCtx, in invalidateGlobalRegion() 1211 SVal Size = cast<SubRegion>(R)->getExtent(svalBuilder); in getSizeInElements() 1212 const llvm::APSInt *SizeInt = svalBuilder.getKnownValue(state, Size); in getSizeInElements() [all …]
|
D | ExprEngineObjC.cpp | 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()
|
D | MemRegion.cpp | 183 DefinedOrUnknownSVal TypedValueRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent() 184 ASTContext &Ctx = svalBuilder.getContext(); in getExtent() 188 return nonloc::SymbolVal(svalBuilder.getSymbolManager().getExtentSymbol(this)); in getExtent() 193 QualType sizeTy = svalBuilder.getArrayIndexType(); in getExtent() 194 return svalBuilder.makeIntVal(size.getQuantity(), sizeTy); in getExtent() 197 DefinedOrUnknownSVal FieldRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent() 202 DefinedOrUnknownSVal Extent = DeclRegion::getExtent(svalBuilder); in getExtent() 207 QualType T = getDesugaredValueType(svalBuilder.getContext()); in getExtent() 216 DefinedOrUnknownSVal AllocaRegion::getExtent(SValBuilder &svalBuilder) const { in getExtent() 217 return nonloc::SymbolVal(svalBuilder.getSymbolManager().getExtentSymbol(this)); in getExtent() [all …]
|
D | Environment.cpp | 70 SValBuilder& svalBuilder) const { in getSVal() 94 return svalBuilder.getConstantVal(cast<Expr>(S)).getValue(); in getSVal() 99 return getSVal(EnvironmentEntry(RE, LCtx), svalBuilder); in getSVal()
|
D | ExprEngineCXX.cpp | 246 SVal ZeroVal = svalBuilder.makeZeroVal(getContext().CharTy); in VisitCXXConstructExpr() 399 symVal = svalBuilder.getConjuredHeapSymbolVal(CNE, LCtx, blockCount); in VisitCXXNewExpr() 401 symVal = svalBuilder.conjureSymbolVal(nullptr, CNE, LCtx, CNE->getType(), in VisitCXXNewExpr() 453 Result = svalBuilder.evalCast(PlacementLoc, CNE->getType(), in VisitCXXNewExpr() 492 SVal V = svalBuilder.conjureSymbolVal(CS, LCtx, VD->getType(), in VisitCXXCatchStmt() 508 svalBuilder.getRegionManager().getCXXThisRegion( in VisitCXXThisExpr()
|
D | ProgramState.cpp | 76 svalBuilder(createSimpleSValBuilder(alloc, Ctx, *this)), in ProgramStateManager() 315 SValBuilder &svalBuilder = SM.getSValBuilder(); in assumeInBound() local 316 ASTContext &Ctx = svalBuilder.getContext(); in assumeInBound() 319 BasicValueFactory &BVF = svalBuilder.getBasicValueFactory(); in assumeInBound() 326 SVal newIdx = svalBuilder.evalBinOpNN(this, BO_Add, in assumeInBound() 333 svalBuilder.evalBinOpNN(this, BO_Add, UpperBound.castAs<NonLoc>(), in assumeInBound() 340 SVal inBound = svalBuilder.evalBinOpNN(this, BO_LT, newIdx.castAs<NonLoc>(), in assumeInBound()
|
D | ExprEngine.cpp | 72 svalBuilder(StateMgr.getSValBuilder()), in ExprEngine() 122 svalBuilder.makeZeroVal(T), in getInitialState() 123 svalBuilder.getConditionType()); in getInitialState() 159 loc::MemRegionVal L = svalBuilder.getCXXThis(MD, SFC); in getInitialState() 460 SVal thisVal = State->getSVal(svalBuilder.getCXXThis(decl, stackFrame)); in ProcessInitializer() 752 svalBuilder.makeIntValWithPtrWidth(0, false)); in Visit() 840 Optional<SVal> ConstantVal = svalBuilder.getConstantVal(ArgE); in Visit() 881 SVal result = svalBuilder.conjureSymbolVal(nullptr, Ex, LCtx, in Visit() 1666 DefinedOrUnknownSVal Res = svalBuilder.evalEQ(DefaultSt ? DefaultSt : state, in processSwitch() 1756 SVal V = svalBuilder.makeIntVal(ED->getInitVal()); in VisitCommonDeclRefExpr() [all …]
|
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | ExprEngine.h | 75 SValBuilder &svalBuilder; variable 131 SValBuilder &getSValBuilder() { return svalBuilder; } in getSValBuilder() 450 return X.isValid() ? svalBuilder.evalMinus(X.castAs<NonLoc>()) : X; in evalMinus() 454 return X.isValid() ? svalBuilder.evalComplement(X.castAs<NonLoc>()) : X; in evalComplement() 461 return svalBuilder.evalBinOpNN(state, op, L, R, T); in evalBinOp() 466 return R.isValid() ? svalBuilder.evalBinOpNN(state, op, L, in evalBinOp() 472 return svalBuilder.evalBinOp(ST, Op, LHS, RHS, T); in evalBinOp()
|
D | ProgramState.h | 457 std::unique_ptr<SValBuilder> svalBuilder; variable 479 ASTContext &getContext() { return svalBuilder->getContext(); } in getContext() 480 const ASTContext &getContext() const { return svalBuilder->getContext(); } in getContext() 483 return svalBuilder->getBasicValueFactory(); in getBasicVals() 487 return *svalBuilder; in getSValBuilder() 491 return svalBuilder->getSymbolManager(); in getSymbolManager() 494 return svalBuilder->getSymbolManager(); in getSymbolManager() 500 return svalBuilder->getRegionManager(); in getRegionManager() 503 return svalBuilder->getRegionManager(); in getRegionManager() 695 *getStateManager().svalBuilder); in getSVal()
|
D | Store.h | 42 SValBuilder &svalBuilder; 88 return svalBuilder.makeLoc(MRMgr.getVarRegion(VD, LC)); in getLValueVar()
|
D | SVals.h | 348 SVal evalBinOp(SValBuilder &svalBuilder, BinaryOperator::Opcode Op, 351 ConcreteInt evalComplement(SValBuilder &svalBuilder) const; 353 ConcreteInt evalMinus(SValBuilder &svalBuilder) const;
|
D | Environment.h | 77 SVal getSVal(const EnvironmentEntry &E, SValBuilder &svalBuilder) const;
|
D | MemRegion.h | 426 virtual DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const { in getExtent() argument 461 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override; 521 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override; 725 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override; 761 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override; 941 DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override;
|