[PATCH] D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 3 00:30:09 PDT 2020
baloghadamsoftware marked an inline comment as done.
baloghadamsoftware added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:692-699
+ std::tie(StateEnd, StateNotEnd) = State->assume(*RetEnd);
+ if (StateEnd) {
+ C.addTransition(StateEnd);
+ }
+ if (StateNotEnd) {
+ C.addTransition(StateNotEnd);
+ }
----------------
Szelethus wrote:
> Szelethus wrote:
> > Right, so the const is a state split. That doesn't sound like something regular users should fine-tune.
> cost* :^)
We made something like this (upon suggestion from @NoQ) in `STLAlgorithmModeling`. There is an option which is disabled by default, but if the user enables it, then `std::find()` and the like will aggressively assume that the element may not be found thus they return their second iterator parameter. This option is very similar to that one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77150/new/
https://reviews.llvm.org/D77150
More information about the cfe-commits
mailing list