[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 8 06:31:31 PST 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?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/83027 at github.com>
steakhal wrote:
> This functionality could be added to this checker, but to `StdLibraryFunctionsChecker` too, and probably will be added at a time (summary of `getdelim` is not accurate now in that checker). The same bug condition is checked by two different checkers in that case. Otherwise I prefer to add such checks (for NULL arguments) to `StdLibraryFunctionsChecker`.
Thanks for the review! Awesome recommendations.
One note about why we would prefer to implement null checks in this checker is because we don't have `StdLibraryFunctionsChecker` enabled downstream and it would either force us to enable it (which we would only do after a really careful evaluation given the scope of that checker), or keep this patch downstream, which is also fine but we think it wouldn't be so wildly out of space here.
https://github.com/llvm/llvm-project/pull/83027
More information about the cfe-commits
mailing list