[clang] 3a46e59 - [NFC][tests] Rename test file and function names to reflect scope/content (#203731)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 13 17:07:47 PDT 2026


Author: Hubert Tong
Date: 2026-06-14T00:07:42Z
New Revision: 3a46e59c2bf4db22cc22ef8a92d459c34c696731

URL: https://github.com/llvm/llvm-project/commit/3a46e59c2bf4db22cc22ef8a92d459c34c696731
DIFF: https://github.com/llvm/llvm-project/commit/3a46e59c2bf4db22cc22ef8a92d459c34c696731.diff

LOG: [NFC][tests] Rename test file and function names to reflect scope/content (#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.

Added: 
    clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c

Modified: 
    

Removed: 
    clang/test/CodeGen/ubsan-aggregate-null-align.c


################################################################################
diff  --git a/clang/test/CodeGen/ubsan-aggregate-null-align.c b/clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c
similarity index 96%
rename from clang/test/CodeGen/ubsan-aggregate-null-align.c
rename to clang/test/CodeGen/ubsan-aggregate-null-align-bounds.c
index 281a18ed5eb4c..9fc3fd6e64584 100644
--- a/clang/test/CodeGen/ubsan-aggregate-null-align.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;
 }


        


More information about the cfe-commits mailing list