This revision was automatically updated to reflect the committed changes.
Closed by commit rC336835: [analyzer] Track multiple raw pointer symbols in
DanglingInternalBufferChecker. (authored by rkovacs, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D49057
Files:
NoQ accepted this revision.
NoQ added a comment.
Looks great, thanks!
https://reviews.llvm.org/D49057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rnkovacs updated this revision to Diff 154556.
rnkovacs marked 5 inline comments as done.
rnkovacs added a comment.
Thanks very much for your review!
https://reviews.llvm.org/D49057
Files:
lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp
rnkovacs added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp:32-40
+namespace clang {
+namespace ento {
+template<> struct ProgramStateTrait
+ : public ProgramStatePartialTrait {
+ static void *GDMIndex() {
+static int Index =
NoQ added a comment.
Much symbols!
Comment at: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp:126
+ NewSet = F.add(NewSet, RawPtr.getAsSymbol());
+ if (!NewSet.isEmpty()) {
+State = State->set(ObjRegion, NewSet);
rnkovacs
rnkovacs added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp:121
+ if (State->contains(ObjRegion)) {
+NewSet = *State->get(ObjRegion);
+if (NewSet.contains(RawPtr.getAsSymbol()))
xazax.hun wrote:
rnkovacs updated this revision to Diff 154520.
rnkovacs marked an inline comment as done.
https://reviews.llvm.org/D49057
Files:
lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp
test/Analysis/dangling-internal-buffer.cpp
Index: test/Analysis/dangling-internal-buffer.cpp
xazax.hun added a comment.
Thanks! The changes look good, I forgot to mark one double lookup though in my
previous review.
Comment at: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp:121
+ if (State->contains(ObjRegion)) {
+NewSet =
rnkovacs added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp:126
+ NewSet = F.add(NewSet, RawPtr.getAsSymbol());
+ if (!NewSet.isEmpty()) {
+State = State->set(ObjRegion, NewSet);
xazax.hun wrote:
>
rnkovacs updated this revision to Diff 154519.
rnkovacs marked 5 inline comments as done.
rnkovacs edited the summary of this revision.
rnkovacs added a comment.
Addressed comments.
https://reviews.llvm.org/D49057
Files:
lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp
xazax.hun accepted this revision.
xazax.hun added a comment.
This revision is now accepted and ready to land.
Overall looks good, some nits inline. Let's run it on some projects to exercise
this change.
Comment at:
rnkovacs created this revision.
rnkovacs added reviewers: NoQ, xazax.hun, george.karpenkov.
Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, szepet,
baloghadamsoftware, whisperity.
Previously, the checker only tracked one raw pointer symbol for each container
object. But member
12 matches
Mail list logo