[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks
Takuto Ikuta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 5 08:13:32 PDT 2017
takuto.ikuta added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:357
+ return;
+ } else if (isEndCall(Func)) {
handleEnd(C, OrigExpr, Call.getReturnValue(),
----------------
We cannot use else after return?
http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:576
+ auto &SymMgr = C.getSymbolManager();
+ const auto oldOffset = Pos->getOffset();
+ auto newOffset =
----------------
oldOffset -> OldOffset?
same with L577, L580, L595, L596, L599 and so on.
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:941
+ return State;
+ } else {
+ const auto CData = CDataPtr->newBegin(Sym);
----------------
else after return?
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:945
+ }
+ } else {
+ const auto CData = ContainerData::fromBegin(Sym);
----------------
else after return too.
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1195
+ Expr->getType());
+ } else {
+ return LExpr->getLHS();
----------------
else after return?
https://reviews.llvm.org/D32642
More information about the cfe-commits
mailing list