Skip to content

Commit 0014aab

Browse files
committed
[clang][dataflow] Use IntegerValue instead of StructValue in ValueTest.
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. Reviewed By: xazax.hun, gribozavr2 Differential Revision: https://reviews.llvm.org/D154934
1 parent 5b6b2ca commit 0014aab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clang/unittests/Analysis/FlowSensitive/ValueTest.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ using namespace clang;
1919
using namespace dataflow;
2020

2121
TEST(ValueTest, EquivalenceReflexive) {
22-
StructValue V;
22+
IntegerValue V;
2323
EXPECT_TRUE(areEquivalentValues(V, V));
2424
}
2525

26+
TEST(ValueTest, DifferentIntegerValuesNotEquivalent) {
27+
IntegerValue V1;
28+
IntegerValue V2;
29+
EXPECT_FALSE(areEquivalentValues(V1, V2));
30+
}
31+
2632
TEST(ValueTest, AliasedReferencesEquivalent) {
2733
auto L = ScalarStorageLocation(QualType());
2834
ReferenceValue V1(L);

0 commit comments

Comments
 (0)