[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 7 08:27:29 PST 2020
martong marked an inline comment as done.
martong added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:697-699
+ // The behavior is undefined if the value of the argument is not
+ // representable as unsigned char or is not equal to EOF. See e.g. C99
+ // 7.4.1.2 The isalpha function (p: 181-182).
----------------
Szelethus wrote:
> This is true for the rest of the summaries as well, but shouldn't we retrieve the `unsigned char` size from `ASTContext`?
Yes this is a good idea. I will do this.
What bothers me really much, however, is that we should handle EOF in a platform dependent way as well ... and I have absolutely no idea how to do that given that is defined by a macro in a platform specific header file. I am desperately in need for help and ideas about how could we get the value of EOF for the analysed platform.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73898/new/
https://reviews.llvm.org/D73898
More information about the cfe-commits
mailing list