This patch adds a simpe lattice used to collect source loctions. An intended application is to track errors found in code during an analysis.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/Analysis/FlowSensitive/SourceLocationsLattice.h | ||
---|---|---|
57 | I'm not sure what I would test, since it (intentionally) has no guaranteed API. Do you have something particular in mind? I generally avoid testing things like DebugString because we don't want users to rely on them. |
Is there anything special about SourceLocations? I wonder whether we just want a templated PowerSet lattice and instantiate it with SourceLocations.
Not really. Just that we use this lattice in a bunch of analyses for "unsafe access", like std::optional and absl::Statusor and (eventually) pointers. So, it seems generally useful as is. I agree that we should have core powerset lattice, its just that doing so will require a little more design effort (similar to the map lattice I added). Happy to add that as a FIXME (which we plan to start tacking with github issues soon!), if that sounds good to you.
clang/include/clang/Analysis/FlowSensitive/SourceLocationsLattice.h | ||
---|---|---|
57 | Fair point. Let's keep it as is. |
Remove the last _ for consistency with the other headers.