[clang] [clang][analyzer] StreamChecker: Add more APIs, invalidate fscanf args (PR #82476)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 03:26:51 PST 2024
================
@@ -396,6 +418,18 @@ class StreamChecker : public Checker<check::PreCall, eval::Call,
0}},
{{{"fileno"}, 1},
{&StreamChecker::preDefault, &StreamChecker::evalFileno, 0}},
+ {{{"getc"}, 1},
+ {std::bind(&StreamChecker::preReadWrite, _1, _2, _3, _4, true),
+ std::bind(&StreamChecker::evalFgetx, _1, _2, _3, _4, true), 0}},
+ {{{"vfscanf"}, 3},
+ {std::bind(&StreamChecker::preReadWrite, _1, _2, _3, _4, true),
+ &StreamChecker::evalFscanf, 0}},
+ {{{"putc"}, 2},
+ {std::bind(&StreamChecker::preReadWrite, _1, _2, _3, _4, false),
+ std::bind(&StreamChecker::evalFputx, _1, _2, _3, _4, true), 1}},
----------------
balazske wrote:
Entry for `putc` belongs (directly) after `fputs` (or `fputc`).
https://github.com/llvm/llvm-project/pull/82476
More information about the cfe-commits
mailing list