[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-23 Thread Balogh, Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. baloghadamsoftware marked 4 inline comments as done. Closed by commit rG60bad941a1c1: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std… (authored by baloghadamsoftware). Repository: rG LLVM

[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-20 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:221 +if (Handler) { + if (!C.wasInlined) { +if (Call.getNumArgs() > 1) {

[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-20 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 9 inline comments as done. baloghadamsoftware added a comment. In D76361#1929483 , @martong wrote: > I suppose we could get this strange behavior with `std::distance` too? Would > it be worth to handle that as well here?

[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-20 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 251567. baloghadamsoftware added a comment. Updated according to the comments and automatic formatting suggestions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76361/new/ https://reviews.llvm.org/D76361 Files:

[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-18 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:221 +if (Handler) { + if (!C.wasInlined) { +if (Call.getNumArgs() > 1) { Perhaps putting this hunk into a separate function or lambda could

[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-18 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Whenever the analyzer budget runs out just at the point where std::advance(), > std::prev() or std::next() is invoked the function are not inlined. This > results in strange behavior such as std::prev(v.end()) equals v.end(). To > prevent this model these functions

[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-18 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, Szelethus. baloghadamsoftware added a project: clang. Herald added subscribers: ASDenysPetrov, martong, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun,

[PATCH] D76361: [Analyzer] Iterator Modeling - Model `std::advance()`, `std::prev()` and `std::next()`

2020-03-18 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Partially replacing D62895 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76361/new/ https://reviews.llvm.org/D76361 ___