[PATCH] D82185: [Analyzer] Handle pointer implemented as iterators in iterator checkers
Endre Fülöp via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 01:02:21 PDT 2020
gamesh411 added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:623
+
+ auto TempState = advancePosition(State, OldVal, OK, Offset);
+ const IteratorPosition *NewPos = getIteratorPosition(TempState, OldVal);
----------------
Same as in the other patch. I think variable name `TempState` is too generic, should be AdvancedState or something more descriptive.
================
Comment at: clang/test/Analysis/iterator-modeling.cpp:1875
+ clang_analyzer_denote(clang_analyzer_container_begin(c), "$c.begin()");
+ clang_analyzer_express(clang_analyzer_iterator_position(i)); //expected-warning{{$c.begin()}}
+
----------------
Just being annoying here, but I saw you use `// expected` (with a space between the slash and expected) consistently elsewhere. Could you please also use that here in these tests as well? Being uniform with those helps spot other errors and typos IMHO.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82185/new/
https://reviews.llvm.org/D82185
More information about the cfe-commits
mailing list