[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 19 09:32:39 PDT 2024


balazske wrote:

> @balazske Are you interested in refactoring the logic of `StdLibraryFunctionsChecker` into an API that can be used by separate checkers?

I could try it. It would solve at least the (dependency) difficulties related to this checker. Probably the checker can remain and contain the functions that are evaluated with `evalCall`, but no others (the others can be moved to a relevant checker, or `UnixAPIChecker`). But I have still concerns if this is the best solution or the current is good too. The current checkers often do not check all aspects of a function, for example `MallocChecker` and `UnixAPIChecker` checks `malloc` like calls, and a checker becomes always more difficult if new things are added to it (all pre- and postconditions of checked functions) that are somewhat irrelevant to the scope of the checker. The question requires more discussion.

https://github.com/llvm/llvm-project/pull/83027


More information about the cfe-commits mailing list