[PATCH] D154934: [clang][dataflow] Use `IntegerValue` instead of `StructValue` in `ValueTest`.
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0014aab2d588: [clang][dataflow] Use `IntegerValue` instead of `StructValue` in `ValueTest`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154934/new/ https://reviews.llvm.org/D154934 Files: clang/unittests/Analysis/FlowSensitive/ValueTest.cpp Index: clang/unittests/Analysis/FlowSensitive/ValueTest.cpp === --- clang/unittests/Analysis/FlowSensitive/ValueTest.cpp +++ clang/unittests/Analysis/FlowSensitive/ValueTest.cpp @@ -19,10 +19,16 @@ using namespace dataflow; TEST(ValueTest, EquivalenceReflexive) { - StructValue V; + IntegerValue V; EXPECT_TRUE(areEquivalentValues(V, V)); } +TEST(ValueTest, DifferentIntegerValuesNotEquivalent) { + IntegerValue V1; + IntegerValue V2; + EXPECT_FALSE(areEquivalentValues(V1, V2)); +} + TEST(ValueTest, AliasedReferencesEquivalent) { auto L = ScalarStorageLocation(QualType()); ReferenceValue V1(L); Index: clang/unittests/Analysis/FlowSensitive/ValueTest.cpp === --- clang/unittests/Analysis/FlowSensitive/ValueTest.cpp +++ clang/unittests/Analysis/FlowSensitive/ValueTest.cpp @@ -19,10 +19,16 @@ using namespace dataflow; TEST(ValueTest, EquivalenceReflexive) { - StructValue V; + IntegerValue V; EXPECT_TRUE(areEquivalentValues(V, V)); } +TEST(ValueTest, DifferentIntegerValuesNotEquivalent) { + IntegerValue V1; + IntegerValue V2; + EXPECT_FALSE(areEquivalentValues(V1, V2)); +} + TEST(ValueTest, AliasedReferencesEquivalent) { auto L = ScalarStorageLocation(QualType()); ReferenceValue V1(L); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D154934: [clang][dataflow] Use `IntegerValue` instead of `StructValue` in `ValueTest`.
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Soon, it will no longer be possible to default-construct `StructValue`. For details, see https://discourse.llvm.org/t/70086. For completeness, also add a test that `areEquivalentValues()` on different `IntegerValue`s returns false. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D154934 Files: clang/unittests/Analysis/FlowSensitive/ValueTest.cpp Index: clang/unittests/Analysis/FlowSensitive/ValueTest.cpp === --- clang/unittests/Analysis/FlowSensitive/ValueTest.cpp +++ clang/unittests/Analysis/FlowSensitive/ValueTest.cpp @@ -19,10 +19,16 @@ using namespace dataflow; TEST(ValueTest, EquivalenceReflexive) { - StructValue V; + IntegerValue V; EXPECT_TRUE(areEquivalentValues(V, V)); } +TEST(ValueTest, DifferentIntegerValuesNotEquivalent) { + IntegerValue V1; + IntegerValue V2; + EXPECT_FALSE(areEquivalentValues(V1, V2)); +} + TEST(ValueTest, AliasedReferencesEquivalent) { auto L = ScalarStorageLocation(QualType()); ReferenceValue V1(L); Index: clang/unittests/Analysis/FlowSensitive/ValueTest.cpp === --- clang/unittests/Analysis/FlowSensitive/ValueTest.cpp +++ clang/unittests/Analysis/FlowSensitive/ValueTest.cpp @@ -19,10 +19,16 @@ using namespace dataflow; TEST(ValueTest, EquivalenceReflexive) { - StructValue V; + IntegerValue V; EXPECT_TRUE(areEquivalentValues(V, V)); } +TEST(ValueTest, DifferentIntegerValuesNotEquivalent) { + IntegerValue V1; + IntegerValue V2; + EXPECT_FALSE(areEquivalentValues(V1, V2)); +} + TEST(ValueTest, AliasedReferencesEquivalent) { auto L = ScalarStorageLocation(QualType()); ReferenceValue V1(L); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits