[PATCH] D81407: [Analyzer][StreamChecker] Add note tags for file opening.
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 19 02:39:19 PDT 2020
Szelethus added a comment.
I see where you're coming from @NoQ. What do you think, @balazske? I think there is is still value in this implementation as a //debug// option to gather data, so that we don't invest a lot of time creating a robust infrastructure for an idea that might not work out.
In D81407#2102641 <https://reviews.llvm.org/D81407#2102641>, @balazske wrote:
> I do not understand fully this "globally". A new option should be added that affects all checkers that detect some kind of resource leak?
Yup, its a fair point that all leaks describe the same kind of bug, even if the root cause of that bug may come from different kinds of programming errors, so it makes sense to unique them all the same way.
> And then implement that kind of report uniqueness in all checkers that detect resource leak.
That could be helped additionally by creating a distinct `LeakBugReport`, derived from `PathSensitiveBugReport`, that would take non-optional uniqueing lambda to find the `ExplodedNode` responsible for the resource acquisition. Or the actual `ExplodedNode` itself.
> Other possible solution: Leave the current way of checker specific options, and add a kind of "meta-option" that can set multiple (checker) options in a batch. For our case this would set the report uniqueing option for every checker that supports it. Still it remains possible to set options separately for each checker.
That could be achieved with Artem's proposed package system (or hashtags): D77866#2069144 <https://reviews.llvm.org/D77866#2069144> (Package options are a thing even today). However, if we had a `LeakBugReport` class, we could implement the option with regular analyzer configs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81407/new/
https://reviews.llvm.org/D81407
More information about the cfe-commits
mailing list