This revision was automatically updated to reflect the committed changes.
Closed by commit rC340805: [Analyzer] Iterator Checker - Part 3: Invalidation
check, first for (copy)… (authored by baloghadamsoftware, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D32747
Files:
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: Szelethus.
Looks great, let's land this!
https://reviews.llvm.org/D32747
___
cfe-commits mailing list
baloghadamsoftware added a comment.
https://reviews.llvm.org/D32747
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware added a comment.
Yes, it is working now without the hack.
https://reviews.llvm.org/D32747
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware updated this revision to Diff 158701.
baloghadamsoftware added a comment.
Copying iterator position for the `this` pointer of C++ operators from the
caller's context to the callee's context is no longer needed.
https://reviews.llvm.org/D32747
Files:
NoQ added a comment.
I suspect that with https://reviews.llvm.org/rC338135 your operator
this-argument re-assignment mechanism is no longer necessary. Due to the
combination of support for materializing temporaries that i added previously
and the change in the AST that turns the operator
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605
+ if (Pos && !Pos->isValid()) {
+// If I do not put a tag here, some invalidation tests will fail
+static CheckerProgramPointTag Tag("InvalidatedIteratorChecker",
baloghadamsoftware updated this revision to Diff 158479.
baloghadamsoftware added a comment.
Pre-statement check of `CXXOperatorCallExpr` merged into pre-call check.
https://reviews.llvm.org/D32747
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
NoQ added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605
+ if (Pos && !Pos->isValid()) {
+// If I do not put a tag here, some invalidation tests will fail
+static CheckerProgramPointTag Tag("InvalidatedIteratorChecker",
baloghadamsoftware marked an inline comment as not done.
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605
+ if (Pos && !Pos->isValid()) {
+// If I do not put a tag here, some invalidation tests will fail
+static
NoQ added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605
+ if (Pos && !Pos->isValid()) {
+// If I do not put a tag here, some invalidation tests will fail
+static CheckerProgramPointTag Tag("InvalidatedIteratorChecker",
baloghadamsoftware marked an inline comment as not done.
baloghadamsoftware added inline comments.
Comment at: test/Analysis/invalidated-iterator.cpp:32
+ *i0; // expected-warning{{Invalidated iterator accessed}}
+}
whisperity wrote:
> This might not be
baloghadamsoftware updated this revision to Diff 154358.
baloghadamsoftware marked 2 inline comments as done.
baloghadamsoftware added a comment.
Re-upload because of a mistake.
https://reviews.llvm.org/D32747
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
baloghadamsoftware updated this revision to Diff 154357.
baloghadamsoftware added a comment.
Updated according to the comments.
https://reviews.llvm.org/D32747
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
whisperity added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:92
+ // Whether iterator is valid
+ bool Valid;
+
Seeing that in line 106 you consider this record immutable, you might want to
add a `const` on this field too.
baloghadamsoftware updated this revision to Diff 153308.
baloghadamsoftware added a comment.
Herald added a reviewer: george.karpenkov.
Herald added a subscriber: mikhail.ramalho.
Rebased to https://reviews.llvm.org/rL335835.
https://reviews.llvm.org/D32747
Files:
baloghadamsoftware updated this revision to Diff 130149.
baloghadamsoftware added a comment.
Updated according to the comments.
https://reviews.llvm.org/D32747
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
a.sidorin added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1256
+if (Cond(Reg.second)) {
+ State = setIteratorPosition(State, Reg.first, Proc(Reg.second));
+}
baloghadamsoftware wrote:
> a.sidorin wrote:
> >
baloghadamsoftware added a comment.
Thanks you for your comments! I have one question:
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1256
+if (Cond(Reg.second)) {
+ State = setIteratorPosition(State, Reg.first, Proc(Reg.second));
+}
a.sidorin added a comment.
Hello Adam. I have a nit inline.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1256
+if (Cond(Reg.second)) {
+ State = setIteratorPosition(State, Reg.first, Proc(Reg.second));
+}
Updating ProgramState is
baloghadamsoftware updated this revision to Diff 129870.
baloghadamsoftware added a comment.
Rebased to current Part 2.
https://reviews.llvm.org/D32747
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605
+ if (Pos && !Pos->isValid()) {
+// If I do not put a tag here, some invalidation tests will fail
+static CheckerProgramPointTag Tag("InvalidatedIteratorChecker",
NoQ added inline comments.
Herald added subscribers: a.sidorin, rnkovacs, szepet.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605
+ if (Pos && !Pos->isValid()) {
+// If I do not put a tag here, some invalidation tests will fail
+static
takuto.ikuta added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:271
+ InvalidatedBugType.reset(
+ new BugType(this, "Iterator invalidated", "Misuse of STL APIs"));
+ InvalidatedBugType->setSuppressOnSink(true);
OK to use
24 matches
Mail list logo