Page MenuHomePhabricator

[analyzer][NFC] Refactoring BugReporter.cpp P1.: Store interesting symbols/regions in a simple set
ClosedPublic

Authored by Szelethus on Sun, Jul 28, 2:06 PM.

Details

Summary

The goal of this refactoring effort was to better understand how interestingness was propagated in BugReporter.cpp, which eventually turned out to be a dead end, but with such a twist, I wouldn't even want to spoil it ahead of time. However, I did get to learn a lot about how things are working in there.

In these series of patches, as well as cleaning up the code big time, I invite you to study how BugReporter.cpp operates, and discuss how we could design this file to reduce the horrible mess that it is.


This patch reverts a great part of rC162028, which holds the title "Allow multiple PathDiagnosticConsumers to be used with a BugReporter at the same time.". This, however doesn't imply that there's any need for multiple "layers" or stacks of interesting symbols and regions, quite the contrary, I would argue that we would like to generate the same amount of information for all output types, and only process them differently.

Diff Detail

Repository
rL LLVM

Event Timeline

Szelethus created this revision.Sun, Jul 28, 2:06 PM
NoQ accepted this revision.Mon, Jul 29, 5:14 PM

I dunno why rC162028 was doing this. That's some advanced archeology down there.

This revision is now accepted and ready to land.Mon, Jul 29, 5:14 PM
xazax.hun accepted this revision.EditedMon, Jul 29, 8:13 PM

LGTM! I also do not see much value in the old code at this point. I would expect PathDiagnosticConsumers to be independent of the interesting symbols/regions.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptTue, Aug 13, 6:08 AM