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

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 19 03:56:32 PDT 2024


Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/83027 at github.com>


NagyDonat wrote:

Just chiming in to cast a supporting vote for the idea that
> Probably it would be better if StdLibraryFunctionsChecker would be an API (instead of checker) and in this way any checker can use it for the specific functions. But with the current solution the checks in StdLibraryFunctionsChecker can be changed for specific needs. (For example if a buffer size check is needed in a checker like StreamChecker it could use a simple API to do this. With the current implementation it can not use an API, but we can add the check into StdLibraryFunctionsChecker instead.) The checks like sufficient buffer size or NULL pointer arguments are common to many checkers and implementing these separately is code repetition and makes checker code more difficult.

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

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


More information about the cfe-commits mailing list