[clang] 6e31709 - [ClangModule] Fix decl-params-determinisim test after serialization change (#72572)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 17 09:17:20 PST 2023


Author: Steven Wu
Date: 2023-11-17T09:17:15-08:00
New Revision: 6e31709283478aec409af924d9e9c13843f13c42

URL: https://github.com/llvm/llvm-project/commit/6e31709283478aec409af924d9e9c13843f13c42
DIFF: https://github.com/llvm/llvm-project/commit/6e31709283478aec409af924d9e9c13843f13c42.diff

LOG: [ClangModule] Fix decl-params-determinisim test after serialization change (#72572)

Fix decl-params-determinisim test after 48be81e1 packed some information
in the clang module. The test is to make sure the decls are appearing in
a strict ordering and it relies on check the correct field in the
bitcode format.

Add more explanation in the comments to help future updates when
serialization format affects this test.

Added: 
    

Modified: 
    clang/test/Modules/decl-params-determinisim.m

Removed: 
    


################################################################################
diff  --git a/clang/test/Modules/decl-params-determinisim.m b/clang/test/Modules/decl-params-determinisim.m
index ccad40b98d8edf4..351403d9af947e2 100644
--- a/clang/test/Modules/decl-params-determinisim.m
+++ b/clang/test/Modules/decl-params-determinisim.m
@@ -19,31 +19,32 @@
 // RUN: 
diff  %t1.pcm %t2.pcm
 
 /// Spot check entries to make sure they are in current ordering.
-/// op13 encodes the anonymous decl number which should be in order.
+/// op6 encodes the anonymous decl number which should be in order.
 
 /// NOTE: This test case is on determinism of TypeID for function declaration.
 /// Change related to TypeID (or PredefinedTypeIDs) will affect the result and
-/// will require update for this test case.
+/// will require update for this test case. Currently, TypeID is at op6 and the
+/// test checks the IDs are in strict ordering.
 
 // CHECK: <TYPE_FUNCTION_PROTO
 // CHECK-NEXT: <DECL_PARM_VAR
-// CHECK-SAME: op11=4040
+// CHECK-SAME: op6=2
 // CHECK-NEXT: <DECL_PARM_VAR
-// CHECK-SAME: op11=4048
+// CHECK-SAME: op6=3
 // CHECK-NEXT: <DECL_PARM_VAR
-// CHECK-SAME: op11=4056
+// CHECK-SAME: op6=4
 // CHECK-NEXT: <DECL_PARM_VAR
-// CHECK-SAME: op11=4064
+// CHECK-SAME: op6=5
 
 /// Decl records start at 43
 // CHECK: <DECL_RECORD
-// CHECK-SAME: op9=4368
+// CHECK-SAME: op6=43
 // CHECK-NEXT: <DECL_RECORD
-// CHECK-SAME: op9=4376
+// CHECK-SAME: op6=44
 // CHECK-NEXT: <DECL_RECORD
-// CHECK-SAME: op9=4384
+// CHECK-SAME: op6=45
 // CHECK-NEXT: <DECL_RECORD
-// CHECK-SAME: op9=4392
+// CHECK-SAME: op6=46
 
 //--- headers/a.h
 void f(struct A0 *a0,


        


More information about the cfe-commits mailing list