diff options
| author | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
|---|---|---|
| committer | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
| commit | 38500d63e14ce340236840f60d356cdefb56a52c (patch) | |
| tree | 17edbec446ce9b50d2f215a483b83afb293a635d /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
| parent | 1a3d5daaef7a6a63448a497da3eff7fc9e23df26 (diff) | |
| parent | 27f30029741ecf023baece7b3dde1ff9011ffefc (diff) | |
Merge branch 'main' into users/meinersbur/flang_runtime_split-headersusers/meinersbur/flang_runtime_split-headers
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp index 4f30b2a0e7e7..356d63e3e8b8 100644 --- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp @@ -1643,7 +1643,7 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( public: GetMaxValue(BasicValueFactory &BVF) : BVF(BVF) {} std::optional<RangeInt> operator()(QualType Ty) { - return BVF.getMaxValue(Ty).getLimitedValue(); + return BVF.getMaxValue(Ty)->getLimitedValue(); } std::optional<RangeInt> operator()(std::optional<QualType> Ty) { if (Ty) { @@ -1687,11 +1687,11 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( const QualType SizePtrTy = getPointerTy(SizeTy); const QualType SizePtrRestrictTy = getRestrictTy(SizePtrTy); - const RangeInt IntMax = BVF.getMaxValue(IntTy).getLimitedValue(); + const RangeInt IntMax = BVF.getMaxValue(IntTy)->getLimitedValue(); const RangeInt UnsignedIntMax = - BVF.getMaxValue(UnsignedIntTy).getLimitedValue(); - const RangeInt LongMax = BVF.getMaxValue(LongTy).getLimitedValue(); - const RangeInt SizeMax = BVF.getMaxValue(SizeTy).getLimitedValue(); + BVF.getMaxValue(UnsignedIntTy)->getLimitedValue(); + const RangeInt LongMax = BVF.getMaxValue(LongTy)->getLimitedValue(); + const RangeInt SizeMax = BVF.getMaxValue(SizeTy)->getLimitedValue(); // Set UCharRangeMax to min of int or uchar maximum value. // The C standard states that the arguments of functions like isalpha must @@ -1700,7 +1700,7 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( // to be true for commonly used and well tested instruction set // architectures, but not for others. const RangeInt UCharRangeMax = - std::min(BVF.getMaxValue(ACtx.UnsignedCharTy).getLimitedValue(), IntMax); + std::min(BVF.getMaxValue(ACtx.UnsignedCharTy)->getLimitedValue(), IntMax); // Get platform dependent values of some macros. // Try our best to parse this from the Preprocessor, otherwise fallback to a @@ -3704,7 +3704,7 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( // Functions for testing. if (AddTestFunctions) { - const RangeInt IntMin = BVF.getMinValue(IntTy).getLimitedValue(); + const RangeInt IntMin = BVF.getMinValue(IntTy)->getLimitedValue(); addToFunctionSummaryMap( "__not_null", Signature(ArgTypes{IntPtrTy}, RetType{IntTy}), |
