Author: Martin Braenne
Date: 2023-07-12T04:52:22Z
New Revision: 0014aab2d5882525c23130108e17fbbb5a2120f1

URL: 
https://github.com/llvm/llvm-project/commit/0014aab2d5882525c23130108e17fbbb5a2120f1
DIFF: 
https://github.com/llvm/llvm-project/commit/0014aab2d5882525c23130108e17fbbb5a2120f1.diff

LOG: [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

Added: 
    

Modified: 
    clang/unittests/Analysis/FlowSensitive/ValueTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Analysis/FlowSensitive/ValueTest.cpp 
b/clang/unittests/Analysis/FlowSensitive/ValueTest.cpp
index 02f3adeaeda756..19ea7a04928f28 100644
--- a/clang/unittests/Analysis/FlowSensitive/ValueTest.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/ValueTest.cpp
@@ -19,10 +19,16 @@ using namespace clang;
 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

Reply via email to