We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 702d9dd commit ec1024dCopy full SHA for ec1024d
clang/test/CodeGen/array-bounds-constraints-safety.c
@@ -69,8 +69,10 @@ int test_extern_array(int i) {
69
}
70
71
// CHECK-LABEL: define {{.*}} @test_local_constant_array
72
+void init_array(int *arr);
73
int test_local_constant_array(int i) {
74
int arr[10];
75
+ init_array(arr); // Initialize to avoid UB from uninitialized read.
76
// CHECK: call void @llvm.assume
77
// This will generate bounds constraints.
78
// We know the exact size of this alloca array.
0 commit comments