summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-03-14 16:48:29 +0000
committerVedant Kumar <vsk@apple.com>2017-03-14 16:48:29 +0000
commit62ace80238719ca137bcd15272c606ea18d33e88 (patch)
tree22bddf16023a7ac9efadf4f8fee0575fa799b6ce /test/CodeGenObjC
parent4551c297a53539e41379dbafb28ef8815dcc7251 (diff)
[ubsan] Use the nicer nullability diagnostic handlers
This is a follow-up to r297700 (Add a nullability sanitizer). It addresses some FIXME's re: using nullability-specific diagnostic handlers from compiler-rt, now that the necessary handlers exist. check-ubsan test updates to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r--test/CodeGenObjC/ubsan-nullability.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/CodeGenObjC/ubsan-nullability.m b/test/CodeGenObjC/ubsan-nullability.m
index d72b774ec7..457f071363 100644
--- a/test/CodeGenObjC/ubsan-nullability.m
+++ b/test/CodeGenObjC/ubsan-nullability.m
@@ -20,7 +20,7 @@ int *_Nonnull nonnull_retval1(int *p) {
// CHECK: [[NULL]]:
// CHECK: [[ICMP:%.*]] = icmp ne i32* {{.*}}, null, !nosanitize
// CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
- // CHECK: call void @__ubsan_handle_nonnull_return{{.*}}[[NONNULL_RV_LOC1]]
+ // CHECK: call void @__ubsan_handle_nullability_return{{.*}}[[NONNULL_RV_LOC1]]
return p;
// CHECK: [[NONULL]]:
// CHECK-NEXT: ret i32*
@@ -34,7 +34,7 @@ void nonnull_arg(int *_Nonnull p) {}
void call_func_with_nonnull_arg(int *_Nonnull p) {
// CHECK: [[ICMP:%.*]] = icmp ne i32* {{.*}}, null, !nosanitize
// CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
- // CHECK: call void @__ubsan_handle_nonnull_arg{{.*}}[[NONNULL_ARG_LOC]]
+ // CHECK: call void @__ubsan_handle_nullability_arg{{.*}}[[NONNULL_ARG_LOC]]
nonnull_arg(p);
}
@@ -108,7 +108,7 @@ int *_Nonnull nonnull_retval2(int *_Nonnull arg1, //< Test this.
// CHECK: [[NULL]]:
// CHECK-NEXT: [[ICMP:%.*]] = icmp ne i32* {{.*}}, null, !nosanitize
// CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
- // CHECK: call void @__ubsan_handle_nonnull_return{{.*}}[[NONNULL_RV_LOC2]]
+ // CHECK: call void @__ubsan_handle_nullability_return{{.*}}[[NONNULL_RV_LOC2]]
return arg1;
// CHECK: [[NONULL]]:
// CHECK-NEXT: ret i32*
@@ -129,7 +129,7 @@ int *_Nonnull nonnull_retval2(int *_Nonnull arg1, //< Test this.
// CHECK: [[NULL]]:
// CHECK-NEXT: [[ICMP:%.*]] = icmp ne i32* {{.*}}, null, !nosanitize
// CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
- // CHECK: call void @__ubsan_handle_nonnull_return{{.*}}
+ // CHECK: call void @__ubsan_handle_nullability_return{{.*}}
return arg1;
// CHECK: [[NONULL]]:
// CHECK-NEXT: ret i32*
@@ -143,7 +143,7 @@ int *_Nonnull nonnull_retval2(int *_Nonnull arg1, //< Test this.
// CHECK: [[NULL]]:
// CHECK-NEXT: [[ICMP:%.*]] = icmp ne i32* {{.*}}, null, !nosanitize
// CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
- // CHECK: call void @__ubsan_handle_nonnull_return{{.*}}
+ // CHECK: call void @__ubsan_handle_nullability_return{{.*}}
return arg1;
// CHECK: [[NONULL]]:
// CHECK-NEXT: ret i32*
@@ -154,13 +154,13 @@ int *_Nonnull nonnull_retval2(int *_Nonnull arg1, //< Test this.
void call_A(A *a, int *p) {
// CHECK: [[ICMP:%.*]] = icmp ne i32* [[P1:%.*]], null, !nosanitize
// CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
- // CHECK: call void @__ubsan_handle_nonnull_arg{{.*}} !nosanitize
+ // CHECK: call void @__ubsan_handle_nullability_arg{{.*}} !nosanitize
// CHECK: call i32* {{.*}} @objc_msgSend to i32* {{.*}}({{.*}}, i32* [[P1]])
[a objc_method: p];
// CHECK: [[ICMP:%.*]] = icmp ne i32* [[P2:%.*]], null, !nosanitize
// CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
- // CHECK: call void @__ubsan_handle_nonnull_arg{{.*}} !nosanitize
+ // CHECK: call void @__ubsan_handle_nullability_arg{{.*}} !nosanitize
// CHECK: call i32* {{.*}} @objc_msgSend to i32* {{.*}}({{.*}}, i32* [[P2]])
[A objc_clsmethod: p];
}