https://github.com/hubert-reinterpretcast created 
https://github.com/llvm/llvm-project/pull/203731

Rename test file to reflect scope (includes array bounds checking).

Rename test functions for internal convention consistency:
Consistently use "deref" and "subscript" to refer to `*p` and `arr[idx]`        
                                                                                
                             expression forms.


>From 5f8c9ae8e14c76297af19b346e0b76a661cc7c9d Mon Sep 17 00:00:00 2001
From: Hubert Tong <[email protected]>
Date: Fri, 12 Jun 2026 17:10:59 -0400
Subject: [PATCH 1/2] [NFC] Rename test to reflect scope (array bounds
 checking)

---
 ...aggregate-null-align.c => ubsan-aggregate-null-align-bounds.c} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename clang/test/CodeGen/{ubsan-aggregate-null-align.c => 
ubsan-aggregate-null-align-bounds.c} (100%)

diff --git a/clang/test/CodeGen/ubsan-aggregate-null-align.c 
b/clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c
similarity index 100%
rename from clang/test/CodeGen/ubsan-aggregate-null-align.c
rename to clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c

>From 5e7f581a33d6860c757120e1e7b407505fe91e0c Mon Sep 17 00:00:00 2001
From: Hubert Tong <[email protected]>
Date: Fri, 12 Jun 2026 17:20:04 -0400
Subject: [PATCH 2/2] [NFC] Rename test functions for internal convention
 consistency

Consistently use "deref" and "subscript" to refer to `*p` and `arr[idx]`
expression forms.
---
 clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c 
b/clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c
index 281a18ed5eb4c..9fc3fd6e64584 100644
--- a/clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c
+++ b/clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c
@@ -73,16 +73,16 @@ void test_rhs_ptrcheck_subscript(AGG arr[4]) {
 
 // RHS cases - handler call only
 
-// CHECK-LABEL: define {{.*}}@test_init_from_ptr(
+// CHECK-LABEL: define {{.*}}@test_init_from_deref(
 // CHECK: call void @__ubsan_handle_type_mismatch_v1_abort
-void test_init_from_ptr(AGG *src) {
+void test_init_from_deref(AGG *src) {
   AGG local = *src;
   (void)local;
 }
 
-// CHECK-LABEL: define {{.*}}@test_init_from_array(
+// CHECK-LABEL: define {{.*}}@test_init_from_subscript(
 // CHECK: call void @__ubsan_handle_type_mismatch_v1_abort
-void test_init_from_array(AGG arr[4]) {
+void test_init_from_subscript(AGG arr[4]) {
   AGG local = arr[0];
   (void)local;
 }

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to