[PATCH] D55734: [analyzer] Revise GenericTaintChecker's internal representation
Aleksei Sidorin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 23 01:18:15 PST 2018
a_sidorin added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:156
+ bool isDestinationArgument(unsigned ArgNum) const {
+ return (std::find(DstArgs.begin(), DstArgs.end(), ArgNum) !=
+ DstArgs.end());
----------------
llvm::find?
================
Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:192
+ "(CERT/STR31-C. Guarantee that storage for strings has sufficient space "
+ "for "
+ "character data and the null terminator)";
----------------
This string formatting change looks a bit broken.
================
Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:346
- for (llvm::ImmutableSet<unsigned>::iterator
- I = TaintArgs.begin(), E = TaintArgs.end(); I != E; ++I) {
- unsigned ArgNum = *I;
+ for (auto I = TaintArgs.begin(), E = TaintArgs.end(); I != E; ++I) {
+ unsigned ArgNum = *I;
----------------
`for (unsigned ArgNum : TaintArgs)`?
================
Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:488
// Mark the arguments which should be tainted after the function returns.
- for (ArgVector::const_iterator I = DstArgs.begin(),
- E = DstArgs.end(); I != E; ++I) {
+ for (auto I = DstArgs.begin(), E = DstArgs.end(); I != E; ++I) {
unsigned ArgNum = *I;
----------------
`for (unsigned ArgNum : DstArgs)`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55734/new/
https://reviews.llvm.org/D55734
More information about the cfe-commits
mailing list