[PATCH] D149447: [clang][analyzer] Improve documentation of StdCLibraryFunctionArgs checker (NFC)

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 17 07:06:25 PDT 2023


Szelethus accepted this revision.
Szelethus added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/docs/analyzer/checkers.rst:2476-2477
+suppressed. However, the assumption about the argument is still modeled.
+For instance, if the argument to a function must be in between 0 and 255.
+If the value of the argument is unknown, the analyzer will assume that it is in
+this interval, even if warnings for this checker are disabled. Similarly, if a
----------------



================
Comment at: clang/docs/analyzer/checkers.rst:2490-2523
+**List of checked functions**
+
+``fgetc``, ``fread``, ``fwrite``, ``getc``, ``getchar``, ``getdelim``,
+``getenv``, ``getline``, ``isalnum``, ``isalpha``, ``isascii``, ``isblank``,
+``isdigit``, ``isgraph``, ``islower``, ``isprint``, ``ispunct``, ``isspace``,
+``isupper``, ``isxdigit``, ``read``, ``toascii``, ``tolower``, ``toupper``,
+``write``
----------------
balazske wrote:
> Szelethus wrote:
> > We should create an option or something the //actual// list of functions we model. This is the prime example of unsustainable documenting.
> Such function lists are used at documentation of other checkers, but I am not sure if it is good to add such a long list here. Probably the "DisplayLoadedSummaries" option of `apiModeling.StdCLibraryFunctions` checker can be used, this lists only the actually found functions (that have available declaration and are enabled), and the console output needs to be observed to see the list. And this option is currently not documented.
> Such function lists are used at documentation of other checkers

Is it possible that those lists are not really expected to change? We do expect the list for this checker to grow, do we not?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149447



More information about the cfe-commits mailing list