[PATCH] D32906: [Analyzer] Iterator Checker - Part 10: Support for iterators passed as parameter
Takuto Ikuta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 5 07:46:25 PDT 2017
takuto.ikuta added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:711
+void IteratorChecker::checkBeginFunction(CheckerContext &C) const {
+ // Copy state of iterator arguments to iterator parameters
----------------
Can we use `const CheckerContext &C` here?
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:730
+ int idx = 0;
+ for (const auto P : FD->parameters()) {
+ auto Param = State->getLValue(P, LCtx);
----------------
`const auto *P`?
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:731
+ for (const auto P : FD->parameters()) {
+ auto Param = State->getLValue(P, LCtx);
+ auto Arg = State->getSVal(CE->getArg(idx++), LCtx->getParent());
----------------
Can we declare this after L735?
https://reviews.llvm.org/D32906
More information about the cfe-commits
mailing list