[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 08:28:21 PST 2020
NoQ added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:731
+ }
+ return C.getNoteTag([Text, Name](BugReport &BR) -> std::string {
+ SmallString<256> Msg;
----------------
You'll need to check whether the container is actually of interest to the bug report. We don't want notes to be added about changes to irrelevant containers.
You can use a combination of "Report `BR` was emitted by one of the iterator checkers" and "The memory region of the container is marked as interesting" (while also actually marking it as interesting in the checker).
Ideally we should instead make a new generic storage inside the `BugReport` object, in order to pass down the interesting information from the call site of `emitReport` ("Hi, i'm an iterator checker who emitted this report and i'm interested in changes made to the size of this container").
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73720/new/
https://reviews.llvm.org/D73720
More information about the cfe-commits
mailing list