[clang] [clang][Analyzer][NFC] Simplify preDefault/preFseek/preFreadFwrite of StreamChecker (PR #71394)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 6 08:43:04 PST 2023


balazske wrote:

With the current code it is a corner case if this change makes the code more readable. Probably it can be useful if new functions are added to the checker. But the rule here is that there is one "ensure" function to check one aspect of the state, and the pre-callbacks call all of the ensure functions that are needed in that case. It would not much more readable if multiple combinations of ensure functions are made, for example `ensureStreamNonNullAndOpenedAndNoFilePositionIndeterminate`.

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


More information about the cfe-commits mailing list