[clang] [clang][dataflow] Fix bug in `Value` comparison. (PR #76746)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 8 03:15:25 PST 2024


================
@@ -53,8 +53,8 @@ TEST(ValueTest, EquivalentValuesWithDifferentPropsEquivalent) {
   TopBoolValue V2(A.makeAtomRef(Atom(3)));
   V1.setProperty("foo", Prop1);
   V2.setProperty("bar", Prop2);
-  EXPECT_TRUE(areEquivalentValues(V1, V2));
-  EXPECT_TRUE(areEquivalentValues(V2, V1));
+  EXPECT_FALSE(areEquivalentValues(V1, V2));
----------------
martinboehme wrote:

Name of test needs to be changed to reflect the changed behavior.

Also, can you add more tests for these cases:

* Only of of the values has properties
* Both values actually have the same properties, but we still consider them to be not equivalent (because we leave checking of properties up to the analysis)

https://github.com/llvm/llvm-project/pull/76746


More information about the cfe-commits mailing list