[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically
Endre Fülöp via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 12:54:07 PDT 2020
gamesh411 added a comment.
In order to test the non-pointer iterators, an extension has to be made to the system header simulator. Please check the related patch (parent of this one in the stack) https://reviews.llvm.org/D83226.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:267
BinaryOperatorKind OK = BO->getOpcode();
- SVal RVal = State->getSVal(BO->getRHS(), C.getLocationContext());
+ Expr *LHS = BO->getLHS();
+ Expr *RHS = BO->getRHS();
----------------
steakhal wrote:
> You should probably use const where applicable.
> Especially where the refs value depends on a condition operator (eg. few lines below)
Definitely should have done that, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83190/new/
https://reviews.llvm.org/D83190
More information about the cfe-commits
mailing list