[PATCH] D75045: [analyzer] Improved check of `fgetc` in StreamChecker.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 25 03:59:50 PST 2020


balazske added a comment.

In D75045#1891056 <https://reviews.llvm.org/D75045#1891056>, @NoQ wrote:

> In D75045#1891055 <https://reviews.llvm.org/D75045#1891055>, @NoQ wrote:
>
> > How many such platforms can you name?
>
>
> I mean, does Clang even support such targets?


The problem can occur with the "wide" variants of the getc functions when `wchar_t` is same width as `wint_t`, this can be more often (but I am not sure). Even then the character set should contain a character similar to `WEOF`, that is not true for UTF-16 and 32. So there may be low probability for the problem to occur. Is this reason to not have this check at all?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75045





More information about the cfe-commits mailing list