[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-12-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1818-1857 +// int fgetpos(FILE *restrict stream, fpos_t *restrict pos); +// From 'The Open Group Base Specifications Issue 7, 2018 edition': +// "The fgetpos(

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-12-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D135360#3981420 , @balazske wrote: > My current approach is that the POSIX is more strict than the C standard > (POSIX allows a subset of what C allows). I do not see (errno related) > contradiction between these standards

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-12-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. My current approach is that the POSIX is more strict than the C standard (POSIX allows a subset of what C allows). I do not see (errno related) contradiction between these standards (except initialization to zero of errno missing from POSIX, and possible negative value

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-12-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D135360#3862260 , @martong wrote: > In D135360#3839890 , @balazske > wrote: > >> I found some anomalies during development: >> >> - If the checker **StdCLibraryFunctions** is added a

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-11-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 474558. balazske added a comment. Rebase to main and D137722 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135360/new/ https://reviews.llvm.org/D135360 Files: clang/lib/S

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-11-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 473659. balazske added a comment. Added more functions to StdLibraryFunctionsChecker. This is redundant with the StreamChecker for now but makes possible to remove the NULL stream check from StreamChecker and reduce overlap of the checkers. This way no depend

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-10-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. About the "ftell" problem: The POSIX rules are really an extension of the C standard rules. At `ftell` according to C standard `errno` should be set to a positive value if error occurs. The POSIX rules extend this: `errno` is not changed if no error occurs. This can be

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D135360#3885494 , @balazske wrote: > If we look only at the C standard we can not tell much about if the functions > should set `errno`. It seems that setting `errno` is totally > implementation-dependent, except for a few fu

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. If we look only at the C standard we can not tell much about if the functions should set `errno`. It seems that setting `errno` is totally implementation-dependent, except for a few functions that mention `errno`. These are `fgetpos`, `fsetpos`, `ftell` and should set

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-10-17 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1818-1857 +// int fgetpos(FILE *restrict stream, fpos_t *restrict pos); +// From 'The Open Group Base Specifications Issue 7, 2018 edition': +// "The fgetpos()

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-10-17 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D135360#3839890 , @balazske wrote: > I found some anomalies during development: > > - If the checker **StdCLibraryFunctions** is added as dependency for > **alpha.unix.Stream** in //checkers.td// I get some "unexplainable" tes

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-10-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a reviewer: martong. balazske added a comment. Herald added a subscriber: rnkovacs. I found some anomalies during development: - If the checker **StdCLibraryFunctions** is added as dependency for **alpha.unix.Stream** in //checkers.td// I get some "unexplainable" test failures. -

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-10-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a reviewer: NoQ. Herald added a project: