[clang] [analyzer] Model strchr/strrchr/memchr/strstr/strpbrk/strchrnul (PR #207267)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 3 03:03:29 PDT 2026
================
@@ -2617,6 +2639,54 @@ void CStringChecker::evalStrsep(CheckerContext &C,
C.addTransition(State);
}
+void CStringChecker::evalStrchrCommon(CheckerContext &C, const CallEvent &Call,
+ StringRef FnName,
+ bool CanReturnNull) const {
+ CurrentFunctionDescription = FnName;
+ ProgramStateRef State = C.getState();
----------------
Xazax-hun wrote:
Nit: maybe some of these could be moved down, closer to their first use (and after the first early return)?
https://github.com/llvm/llvm-project/pull/207267
More information about the cfe-commits
mailing list