[PATCH] D82385: [Analyzer] Fix errors in iterator modeling

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 05:54:51 PDT 2020


Szelethus added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:530-532
   const auto *Pos = getIteratorPosition(State, LHS);
   if (!Pos)
     return;
----------------
I fear this might be a stupid question, but what's up with `5 + it`? Why does the LHS have to be the iterator? Am I missing something here?


================
Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:541
 
   auto &TgtVal = (Op == OO_PlusEqual || Op == OO_MinusEqual) ? LHS : RetVal;
 
----------------
What does `Tgt` mean?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82385/new/

https://reviews.llvm.org/D82385





More information about the cfe-commits mailing list