[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 18 09:47:26 PDT 2020


Szelethus added a subscriber: steakhal.
Szelethus added a comment.

In D75682#1929093 <https://reviews.llvm.org/D75682#1929093>, @balazske wrote:

> In D75682#1928716 <https://reviews.llvm.org/D75682#1928716>, @Szelethus wrote:
>
> > - For streams where the precise state is unknown (they are not tracked), start tracking. If we explicitly check whether a state is `foef()`, we can rightfully assume both of those possibilities.
>
>
> This can follow in a later revision only. The new stream should have every error state possible, so when it is introduced 3 new states are required (with the error types), or an "unknown error" is needed that will be added later.
>
> > - Evalulate a less complicated stream modeling function that sets such flags, though I suspect the followup patch is supposed to be the one doing this.
>
> The `fseek` patch can do this.


Very well.

>> - Add debug function similar to `clang_analyzer_express`, like `clang_analyzer_set_eof(FILE *)`, etc.
> 
> How to add this? Probably it is too much work and I do not like if separate such debug functions are there for "every" checker (or many of).

@steakhal recently made a patch that contained that and not much else: D74131 <https://reviews.llvm.org/D74131>. I share you dislike with the debug function, but I suspect that it wouldn't be too much work, especially compared to my other suggestions that would introduce testability, unless you have some other ideas (to which I'd be open to!).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75682/new/

https://reviews.llvm.org/D75682





More information about the cfe-commits mailing list