Defines an equivalence relation on the Value type to standardize several
places in the code where we replicate the ~same equivalence comparison.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Analysis/FlowSensitive/Value.cpp | ||
---|---|---|
38 | I started to wonder, is it always the case that we want properties to be part of the identity for values? Especially when we have multiple checks collaborating in the same fixed-point iteration, the properties added by one check might not be interesting for the others, and influencing what values are considered equal is a way to "leak" this information between checks. Feel free to leave it as is for now, I just wanted to make sure we think about this at some point in the future :) |
I don't have a strong preference. But in case we come up with multiple kinds of equalities (see my comment about the properties) methods might work better.
Agreed. I switched to a free function. I think operator== just implies too much.
clang/lib/Analysis/FlowSensitive/Value.cpp | ||
---|---|---|
38 | Good point. This only occurred to me once I was writing it as an operator==. But, we don't do this in the current code and I think its premature. I've taken it out and updated the comment to reflect. We will need to consider this for the future. |
This seems unnecessary.