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

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 06:05:13 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?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/83027 at github.com>


steakhal wrote:

> I want to avoid that some functions have null pointer checks in `StreamChecker`, some not. If this change is merged then it would be good to add null pointer checks to other functions like `fread` and `fwrite`. (Until now only the NULL stream pointer was checked.)

I can really think of having these checks at both checkers, so that both parties are sort of happy - except for of course having this precondition checked at both places. But to me, the question is really as follow: is it better with this, or not?
I'm also open for suggestions for resolving this conflict, so let me know if you have ideas.

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


More information about the cfe-commits mailing list