[clang] [clang][analyzer][NFC] Simplify argument range in StdLibraryFunctionsChecker (PR #78886)
Ben Shi via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 20 23:23:27 PST 2024
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/78886
None
>From 7d0c3f5ce7f6a8d753bf6d5a2020baefeef35703 Mon Sep 17 00:00:00 2001
From: Ben Shi <bennshi at tencent.com>
Date: Sun, 21 Jan 2024 15:20:24 +0800
Subject: [PATCH] [clang][analyzer][NFC] Simplify argument range in
StdLibraryFunctionsChecker
---
.../lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
index d0eb5091444f6b..79bf0d0ec3c024 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
@@ -2219,7 +2219,7 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ArgumentCondition(0, WithinRange, {{0, UCharRangeMax}})},
ErrnoMustNotBeChecked, GenericSuccessMsg)
.Case({ReturnValueCondition(WithinRange, SingleValue(EOFv)),
- ArgumentCondition(0, WithinRange, {{EOFv, EOFv}})},
+ ArgumentCondition(0, WithinRange, SingleValue(EOFv))},
ErrnoNEZeroIrrelevant,
"Assuming that 'ungetc' fails because EOF was passed as "
"character")
More information about the cfe-commits
mailing list