[PATCH] D54466: [Analyzer] [WIP] Iterator Checkers - Use the base region of C++ Base Object Regions (recursively) for iterators stored in a region
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 13 17:09:50 PST 2018
NoQ added a comment.
> I marked this patch as WIP because I could not create a test-case for it. However in real projects this patch seems to reduce false positives significantly.
False positives are hard to reduce via delta-debugging because they can be accidentally reduced into true positives, because the distinction between true positives and false positives cannot be tested automatically. But once you fix the false positive, `creduce` can be used to reduce them by writing down the condition as "the positive is there on the original clang but not on the modified clang". Strongly recommended :)
> Hmmm, shouldn't we add this to `MemRegion`'s interface instead?
I wouldn't insist, but this does indeed sound useful. I suggest `MemRegion::getMostDerivedObjectRegion()` or something like that.
> The member function `getBaseRegion()` of `MemRegion` does not work here because it recursively retrieves the base region of multiple kinds of `SubRegion`.
Also, ugh, that nomenclature: the base region of `CXXBaseObjectRegion` in fact represents the //derived// object.
Repository:
rC Clang
https://reviews.llvm.org/D54466
More information about the cfe-commits
mailing list