[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 23 23:48:08 PST 2020
balazske added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:418
+ if (FailureSt && !SuccessSt) {
+ C.addTransition(FailureSt);
+ if (ExplodedNode *N = C.generateErrorNode(FailureSt))
----------------
Is this `addTransition` needed? It would be OK to call `generateErrorNode` with `State`. Even if not, adding the transition before should not be needed?
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:688
// locale-specific return values.
.Case({ArgumentCondition(0U, WithinRange, {{128, UCharMax}})})
.Case({ArgumentCondition(0U, OutOfRange,
----------------
Why is this `{128, UCharMax}` here and at the next entry needed?
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:696
+ .ArgConstraint(ArgumentCondition(
+ 0U, WithinRange, {{EOFv, EOFv}, {0, UCharMax}}))},
},
----------------
Is this `ArgConstraint` intentionally added only to `isalnum`?
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