[PATCH] D140387: [clang][analyzer] Add stream related functions to StdLibraryFunctionsChecker.
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 3 07:30:33 PST 2023
Szelethus added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:838
+ Result += getArgDesc(ArgN);
+ Result += DK == Violation ? " should not be zero" : " is not zero";
+ return Result.c_str();
----------------
I don't mean to make you test every single `Case` or `ArgumentConstraint` you added, but `NotZeroConstraint` is brand new, and is not tested anywhere.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1105-1113
+ // It is possible that the function was evaluated in a checker callback
+ // where the state constraints are already applied, then no change happens
+ // here to the state (if the ErrnoConstraint did not change it either).
+ // If the evaluated function requires a NoteTag for errno change, it is
+ // added here.
+ if (const auto *D = dyn_cast_or_null<FunctionDecl>(Call.getDecl()))
+ if (const NoteTag *NT =
----------------
Can you name an example for that? `fgetpos`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140387/new/
https://reviews.llvm.org/D140387
More information about the cfe-commits
mailing list